Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
Introduction
User Assignment Count Hash Variable Plugin retrieves the running and completed assignment count for the logged in user.
Available Formats
Plugin Available in the Bundle:
Assignment Count Hash Variable
This plugin bundle is compatible with Joget DX 8.
To be able to retrieve the running and completed assignment count for the logged in user.
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.
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 Name | Field Value |
---|---|
Running Count | #loggedInUser.runningCount# |
Completed Count | #loggedInUser.completedCount# |
Table 1: Field Name and Field Value for Hash Variable
Figure 1: Form with User Assignment Count Hash Variable
2. Create another form to be added in the simple process later on.
Figure 2: Form with empty text field
3. Create a simple process to demonstrate the use case of this plugin. Save the process.
Figure 3: Process Builder with Simple Process (Form 1)
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.
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.
Figure 6: UI with Run Process
6. You can see that the values for the current user have been shown.
Figure 7: Form with User Assignment Count Hash Variable Value
7. Now open a new tab for Run Process. Submit to run the process.
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.
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.
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.
Figure 11: Form with User Assignment Count Hash Variable Value (Running Count decrement by 1, Completed Count increment by 1)
11. Alternatively, you can check the values of assignment details at Administrator Bar > Monitor.
Figure 12: Monitor details
12. Now login with another user (in this demo I will log in as Cat). Run the process.
Figure 13: Another User Run Process
13. Go to Form, you can see that the running count has been increased by 1.
Figure 14: Another User Assignment Count
14. 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.
Figure 15: Existing User Assignment Count