Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents


Introduction

User Assignment Count Hash Variable Plugin retrieves the running and completed assignment count for the logged in user.


Available Formats

  • #loggedInUser.runningCount# -> returns the running assignment count
  • #loggedInUser.completedCount# -> returns the completed assignment count

Plugin Info

Plugin Available in the Bundle:

  1. Assignment Count Hash Variable

This plugin bundle is compatible with Joget DX 8.

Expected Outcome

To be able to retrieve the running and completed assignment count for the logged in user.

Getting Started

Steps

Where to get the plugin

You can get the plugin from https://github.com/jogetoss/assignment-count-hash-variable/releases. Upload the plugin to Joget by navigating to Settings > Manage Plugins > Upload Plugin as admin.

How to use the plugin

1. For reference on how the hash variable works, create a form with two readonly text fields with the values in Table 1. Save the form.

Field NameField Value
Running Count#loggedInUser.runningCount#
Completed Count#loggedInUser.completedCount#

Table 1: Field Name and Field Value for Hash Variable

Image Modified

 Figure 1: Form with User Assignment Count Hash Variable


2. Create another form to be added in the simple process later on.

Image Modified

Figure 2: Form with empty text field


3. Create a simple process to demonstrate the use case of this plugin. Save the process.

Image Modified 

Figure 3: Process Builder with Simple Process (Form 1)

Image Modified

Figure 4: Process Builder with Simple Process (Form 2)


4. Create an UI. Drag the Form element and link the Form 1 created in first step.

Image Modified

Figure 5: UI with Form


5. Next, drag the Run Process element and link the process created in the previous steps. Save and launch the UI.

Image Modified

Figure 6: UI with Run Process


6. You can see that the values for the current user have been shown.

Image Modified

Figure 7: Form with User Assignment Count Hash Variable Value


7. Now open a new tab for Run Process. Submit to run the process. 

Image Modified

Figure 8: Run Process 


8. Return to the existing form tab, refresh and you can see that the running count has been increased by 1.

Image Modified

Figure 9: Form with User Assignment Count Hash Variable Value (Running Count increment by 1)


9. Return to the Run Process tab, click on Complete.

Image Modified

Figure 10: Run Process 2


10. Return to the existing form tab, refresh and you can see that the running count has been decreased by 1, and completed count has been increased by 1.

Image Modified

Figure 11: Form with User Assignment Count Hash Variable Value (Running Count decrement by 1, Completed Count increment by 1)


11. Now login with another user (in this demo I will log in as Cat). You can see the running and completed count is 0. Run the process.

Image Added

Figure 12: Another User Run Process


12. Go to Form, you can see that the running count has been increased by 1.

Image Added

Figure 13: Another User Assignment Count


13. Now login as admin. You can see that the assignment for Cat is not calculated in here. Because this hash is for logged in user only.

Image Added

Figure 14: Existing User Assignment Count


14. Alternatively, as admin, you can check the values of assignment details

...

at Administrator Bar > Monitor.

...

Image Added

Figure

...

15: Monitor details