- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2022 05:35 AM
Hi
I have requested_for variable on the variable set that is used on various catalog items, I want to hide the logged in user as user selection on the requested_for field only for certain catalog item. I understand i can use the reference qualifier condition on the requested_for variable as "sys_id does not contain javascript:gs.getUserID();" - but this will mean it will hide logged in user for all catalog item where this variable set is used, which is not the requirement - As, i only want this to happen on certain catalog items and not all. How can i do this with a client script on the variable set for just this catalog items?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2022 05:45 AM
Hi Sam,
Refer - https://community.servicenow.com/community?id=community_question&sys_id=34c6cf65db1cdbc01dcaf3231f96199d
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2022 05:41 AM
Hello Sam,
My suggestion would be to have an additional variable set that is used for this sole purpose.
In the long term, administration point of view, it will be much easier to work with two, rather than figuring out a very complicated solution that will be difficult to maintain.
Tudor

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2022 05:45 AM
You will have to rely on the reference qualifier only.
But did you try if you can leverage advanced ref using script include and try and access catalog item in the script and then return the query
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2022 07:13 PM
Hi Aman,
Thanks for pointing out, i think the dynamic or advanced ref using script include might be the way, Do you have any sample script or reference to any post seen before that i can use?
Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2022 05:47 AM
Hi Sam,
You can explore dynamic reference qualifier and can script the whole thing in script include and pass it to the dynamic reference qualifier.
Regards,
Deepankar Mathur