- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 01:02 AM
I have a requirement with respect to Service Catalog.
There are 2 fields - location and Service_and_application, where both are reference fields.
location field referring (cmn_location)table and Service_and_application(cmdb_ci_service_business)
When we select location as 'Geneva' in location field then 'Work Visa' choice should be hide form service_and_application field.(Eg.when location is 'Geneva' then 'Work Visa' should not be visible).
Thank You.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 01:13 AM
you can use advanced ref qualifier on 2nd variable and use this
Ensure you give correct location name and WorkVisa record sysId in below
javascript: var query = ''; if(current.variables.location.name == 'Geneva') query = 'sys_id!=workVisaSysId'; query;
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 01:13 AM
you can use advanced ref qualifier on 2nd variable and use this
Ensure you give correct location name and WorkVisa record sysId in below
javascript: var query = ''; if(current.variables.location.name == 'Geneva') query = 'sys_id!=workVisaSysId'; query;
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 03:34 AM
Hi Ankur,
It's working.
Thank you so much.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 03:36 AM
javascript: var query = ''; if(current.variables.location.name == 'Geneva') query='sys_id!=8747ac50a371311013c5265765fcdacb';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 03:47 AM
Glad to know that my response is correct.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader