How to show the groups that the current user is a member of on Service Portal

Bruler1230
Tera Expert

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!

1 ACCEPTED SOLUTION

Allen Andreas
Administrator
Administrator

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!

View solution in original post

9 REPLIES 9

Hi,

I just edited my post slightly, check again.


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi @Bruler1230 ,

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:

find_real_file.png

"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!

thank you very much! That seemed to do the trick. 

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!

@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()