Reference Qualifier - Location of Resource
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi friends
I reckon this is really simple, however I'm having a bit a New Year brain blocker.
I'm creating a catalog item for a pool car booking request. Luckily, we currently only have four pool cars in our organisation spread across three locations, but that means that one location has two pool cars to choose from and I would like users to be able to specify which car they want when they select the location with two cars available.
I've added the pool cars to the ci_vehicles table with pretty arbitrary information and made the location field active in that form to show where the cars are based. For the locations that only have one car available, I've made a UI policy which selects that vehicle and makes the field read only, but for the location with two cars, I'd users to be able to select which one they want.
Field names are collection_location and vehicle_selection.
Will I need to go down a script includes for this, or will some clever advanced reference qualifying help?
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
variable types for both the variables?
share screenshot
to filter and show records based on other variable, you need to use advanced ref qualifier in that variable
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago - last edited 2 hours ago
Hi @JonnyFoster
Assuming both are reference qualifier I think advanced reference qualifier should be sufficient.
Example like:
javascript:'location=' + current.collection_location
Although I don’t have the exact catalog variable as yours to test, I verified this behavior on the Incident form. With Location and CI fields present, the cmdb_ci field is correctly filtered based on the selected Location using an advanced reference qualifier.
Advance qualifier used:
You can try a similar approach by Navigating to the dictionary entry for the reference field and add advanced reference qualifier there
If you find this helpful, please mark it as solution accepted/helpful.
Thanks and Regards,
Mohammed Zakir
