- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2025 04:42 AM
Hi Community,
I’m working on a Service Catalog item where I want to dynamically populate the list of devices based on the user selected in the field.
Here’s the requirement:
There is a variable named please_select_the_device_name_hostname in the catalog item.
When a user is selected in the requested_for field, this variable should display only the devices (from the cmdb_ci_computer table) where the assigned_to field matches the selected user.
The goal is to allow the user/requester to choose from devices that are already assigned to the selected user.
Has anyone implemented this before? What’s the best way to write the Reference Qualifier for this use case?
Thanks in advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2025 05:09 AM
that variable for devices is reference type.
You can use advanced ref qualifier for the variable
javascript: 'assigned_to=' + current.variables.requested_for;
If that is list collector type then use this
javascript: 'assigned_to=' + current.variables.requested_for;
also use this in the variable attributes
ref_qual_elements=requested_for
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
07-30-2025 05:19 AM
we can't see the image, there is some issue going in community and we are unable to see the images.
Please add the file using browse feature.
share all the screenshots.
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
07-30-2025 05:35 AM
variable attributes not required for reference type variable, remove that
Also is the variable name correct requested_for ?
Also use this : and not :
It's a bug in community and it converts colon to the other value.
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
07-30-2025 05:09 AM
that variable for devices is reference type.
You can use advanced ref qualifier for the variable
javascript: 'assigned_to=' + current.variables.requested_for;
If that is list collector type then use this
javascript: 'assigned_to=' + current.variables.requested_for;
also use this in the variable attributes
ref_qual_elements=requested_for
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
07-30-2025 05:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2025 05:19 AM
we can't see the image, there is some issue going in community and we are unable to see the images.
Please add the file using browse feature.
share all the screenshots.
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
07-30-2025 05:24 AM
@Ankur Bawiskar
variable type is reference
I tried, but it's not working, it's showing all devices.