How to use the reference qual only for ITIL users

Jahnavi6
Kilo Expert

ITIL users should be able to search for users from all locations in "on behalf of" field, otherwise users specific to that location should be filtered in record producer/service portal.

So, for the field, I used the advance conditions, in the reference qualifier like this, but it is not working.

 

1 ACCEPTED SOLUTION

javascript: (gs.hasRole('itil') ? 'active=true' : 'location=' + gs.getUser().getLocation());

View solution in original post

15 REPLIES 15

Jahnavi6
Kilo Expert

Hi Ankur, Willlem

If the condition satisfies then it is fine, otherwise it is returning empty. I want all the users(irrespective of location) to be available for that field if the condition is not satisfied.

javascript: (gs.hasRole('itil') ? 'active=true' : 'location=' + gs.getUser().getLocation());

Hi Jahnavi,

 

Can you try below.

javascript: (gs.hasRole('itil') ? 'active=true' : 'location=' + gs.getUser().getLocation());

If itil return all Acive users else only specific location

Just to be sure, can you describe example and share screenshot, if the code I provided does not do what you want?

Hi,

The ref qualifier shared in my earlier reply should work fine

please share your configuration and for which scenario it is not working

Regards
Ankur

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