Join us Dec. 16 for The Community Hour, our first global virtual User Group event!

Restricting group visibility in ServiceNow

MariaVitorS
Tera Contributor

Hi guys, what's up?

I'd like to ask a question: in ServiceNow, is it possible to configure that certain groups are not visible to specific users?
For example, in a reference field in the groups table, would it be possible to make certain groups not appear as an option for user X?

Thanks in advance for your help!

1 ACCEPTED SOLUTION
2 REPLIES 2

Ankur Bawiskar
Tera Patron

@MariaVitorS 

Since you want to filter the data, you can use advanced reference qualifier for this in the group reference field

Something like this will work

Ensure you give user sysId, group name

javascript: var query = '';
if (gs.getUserID() == 'userXSysId') // give that user sysId here
    query = 'name!=Group ABC,Group DEF'; // if logged in user is X then hide these groups
query;

If my response helped please mark it correct and close the thread so that it benefits future readers.