Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

What is ismember of method?

ak4
Tera Contributor

What is ismember of method?

 

5 REPLIES 5

Kunal Varkhede
Tera Guru

Hi,

 

gs.getUser().isMemberOf(groupName)

 

This method is used to check logged user is a member of any group.

 

Thanks,

Kunal

Hi , 

 

What if we want to check a user from multiple groups? 

 

 

sriram35
Kilo Guru

Hi,

isMemberOf():

The values of isMemberOf are identifiers for groups to which the containing entity belongs.

 

isMemberOf() will check is any member of the group or not.

 

gs.getUser().isMemberOf(groupName); 

 

Hope this helps!

If I have answered your question, please mark my response as correct and/or helpful.

Thanks,

Sriram

Hi Sriram, 

What if we want to check a user from multiple groups?