- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2021 11:29 AM
Hello,
I have a form the service portal and I need to have a field that show the groups that the current logged in user is a member of. So when a user comes to the form, they will only see groups that they are part of in the dropdown. Should this be a reference field? Pretty sure I need to use a reference qualifier but wasnt able to figure it out. Thanks!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2021 11:56 AM
Hi,
If you are only wanting to allow them to select one option, then yes, reference field to the sys_user_group table would work. You are also correct about needing an advanced reference qualifier which would be:
javascript:"sys_idIN" + gs.getUser().getMyGroups()
No other scripting required 🙂
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2021 11:57 AM
Hi,
I just edited my post slightly, check again.
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2021 11:58 AM
Hi
I just edited my post slightly, check again. Was in the middle of making an edit, haha.
I know it works as I just verified it again on my own instance, for example:
"is one of" translate to "in" as you can see in the breadcrumb at the top.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2021 11:59 AM
thank you very much! That seemed to do the trick.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2021 12:00 PM
Awesome, glad it worked for you!
Please mark my reply above as Correct and any other reply as Helpful, if it was.
Take care! 🙂
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2023 07:20 AM - edited ‎05-18-2023 07:21 AM
@Allen Andreas
Script is not working on my catalog item. I want to be filter out the group field should be requested for user respectively.
javascript:"sys_idIN" + gs.getUser().getMyGroups()