- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2019 04:58 AM
Hi All,
I have one Variable which is referring to the sys_user table and when that variable is set then i need to auto-populate the users groups in the list collector variable.
Please help me to set the groups of user in the list collector variable.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2019 05:10 AM
Hi Ayushi,
You could set the glide_list attribute on the List collector to make it behave like a normal platform List field. Once the attribute is set, you can set comma separated sys_id's of users directly using g_form.setValue('') without any complex scripting in it. Also it will work on service portal as well.
ie g_form.setValue('list_field' , '1,2,3,4,5'); // comma separated sys_id's of user.
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2019 05:05 AM
Hi,
check here:
If I have answered your question, please mark my response as correct and/or helpful.
Thank you very much
Cheers
Alberto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2019 05:10 AM
Hi Ayushi,
You could set the glide_list attribute on the List collector to make it behave like a normal platform List field. Once the attribute is set, you can set comma separated sys_id's of users directly using g_form.setValue('') without any complex scripting in it. Also it will work on service portal as well.
ie g_form.setValue('list_field' , '1,2,3,4,5'); // comma separated sys_id's of user.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2020 12:22 AM
Hi Alikutty,
I have used same one it is not working in portal.Any suggestion,please let me know.
Thanks,
Pavani.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2019 05:16 AM
Hi,
You would need a reference qualifier and a Script Include.
The SI shall take the user, read the table sys_user_grmember and fetch the groups associated to this user and return back.
Mark the comment as a correct answer and helpful if this helps.