- 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 07:14 PM
Hi Deepankar,
Thanks for pointing out, i think the dynamic or advanced ref using script include might be the way that even Aman has suggested above, checking this with you as well - Do you have any sample script or reference to any post seen before that i can use for this?
Thanks.

- 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 08:49 PM
Hi Sam,
Using a catalog ui policy should be the easiest solution. Set the catalog ui policy to apply on the specific catalog item, build your condition (leave empty if it should always apply) and then use an UI policy action where you set the variable from the variable set to Mandatory -> false and Visible -> false. The other attributes can stay with "Leave alone".
Thanks,
Neha