- 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:56 AM - edited 12-30-2024 01:58 AM
Hello @RunaliP
Add the advanced reference qualifier on service_and_application field.
javascript:current.variables.location=="8938b7111b121100763d91eebc0713ec" ?"name!=Work Visa":"";
8938b7111b121100763d91eebc0713ec : sys_id of location(Geneva)
Refer this for more details: To hide field choice in reference field
Hope this Helps!
"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"
Thank You
Juhi Poddar