- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2019 11:29 AM
Hi all,
I have a catalog to add or remove users from groups. I have a list collector field which references group table, what I am trying to achieve is to populate this list collector with logged-in users group names both on the portal and classic view, please find below a screenshot of the reference qualifier I am using, still, I am seeing all the groups. This list collect filed is only visible if I select an option to "Remove from group" from another field. Also, I am not using "Requested for" filed on the form to dynamically change the list collector values. Would also appreciate sharing the solution for onChnage as well if I thought of suing "requested for" field in future,
Classic View:
Portal:
Would like to populate groups as below
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2019 11:35 AM
You should be using below ref qual
javascript:'sys_idIN'+gs.getUser().getMyGroups()
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2019 11:35 AM
You should be using below ref qual
javascript:'sys_idIN'+gs.getUser().getMyGroups()
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2019 01:38 PM
Hi Sanjiv,
Thanks for the response, I have another scenario where I want list collector field to dynamically filter the groups based on "Requested For" field, how do I implement it?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2019 04:55 PM
You can try below. And you may also need to add Variable attribute in the list collector as ref_qual_elements:requested_for
javascript:'sys_idIN'+gs.getUser().getUserByID(current.variables.requested_for).getMyGroups()
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2019 11:39 AM
Hi Sanjiv,
I have created a 'sys_user' reference field 'service_for' so the list collector should populate groups based on this reference filed value. I tried above reference qualifier condition with attributes you mentioned. It's not working.
javascript:'sys_idIN'+gs.getUser().getUserByID(current.variables.service_for).getMyGroups()