We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

gs.getUser.isMemberOf is not working in scoped application

jyoti29208
Giga Expert

Hello ,

 

In list control for one of related lists gs.getUser.isMemberOf  isn't working. Can somebody please help here

find_real_file.png

4 REPLIES 4

Rajesh Kumar10
Tera Expert

Good day,

 

Please refere below syntax:

gs.getUser().isMemberOf('abc_groupname');

or 

gs.getUser().isMemberOf('refernce field name').getDisplayValue(); - you can use this syntax in UI actions 

Ankur Bawiskar
Tera Patron

Hi,

share your complete script for IF here

you are using it in wrong manner

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Sajilal
Mega Sage

Can you try this way?

 gs.getUser().isMemberOf(current.assignment_group.getDisplayValue())

Please mark helpful/correct if it helped resolve your query.

Thanks,
Saji

Musab Rasheed
Kilo Patron

Hello,

Getdisplayvalue is not required if you are directly passing name of the group simply remove that and it should work. Mark my answer as correct if that helps

gs.getUserID().isMemberof('Name of group');

Regards

Please hit like and mark my response as correct if that helps
Regards,
Musab