Add and Remove User Group

My subform form has 2 drop-down fields. One is called 'Add to Group' and the other is called 'Remove from Group'.
In the process flow, I created a loop to loop through each user record captured in the subform. For each user record, if there are values for 'Add to Group' and 'Remove from Group' in the subform, the acitivites, as seen in the screenshot above, one for Edit Group (to add user to the group) and the one for Remove Group should both be executed before the loop completes.
However, I would also like to cater for the scenario where the requester only fills in values for either of the 2 fields. However, this means that in the process flow, the activity for the field that is filled should be executed while the activity for the field that is not filled should be bypassed or skipped.
Can I check if there is a cleaner or shorter way to configure the process flow for this loop instead of what I have configured in the screenshot?
-
Hello Jordan,
Here is an alternate approach to keep the process flow cleaner.
AgilePoint supports adding or removing multiple users through the "Edit Group" and "Remove Group Members" activities.
The "Add Group Members" field supports multiple valid group member names separated by a semicolon (`;`) and can also accept a process data variable.
Since you have a subform with two dropdown fields:
1. Add to Group
2. Remove from GroupYou can use the AgilePoint Helper Method getSubFormData to retrieve the subform data and identify the users selected for each option, avoiding the need to manually loop through the subform data in the process.
In your case, create a semicolon-separated list of usernames and store it in a text field and bind that field to the respective activity configuration.Here is the documentation link
https://documentation.agilepoint.com/1000/appbuilder/cloudjsMethodsIntro.html
Regards,
Aravind
Please sign in to leave a comment.
Comments
1 comment