- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 07:20 AM
I'm making some improvements to a form, and it has two list collector fields for "Requested For" & Asset Tag(s) respectively. I want the Asset Tag(s) field to show all the assets for any values in the Requested For field.
Currently, the Asset Tag(s) field is only showing the assets for one person in the Requested For field. If I try to add more people to the Requested For field, their assets aren't showing up in Asset Tag(s). I'll include the reference qualifier and variable attributes below.
Reference Qualifier:
javascript:
var query = "sys_class_name=cmdb_ci_computer^operational_status!=6^owned_by="+current.variables.requested_for;
query;
Variable Attributes:
ref_auto_completer=AJAXTableCompleter,ref_ac_columns=asset;owned_by,ref_ac_columns_search=true
Would I need to change my script to get the desired result, or would I need to employ another method?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 07:34 AM
you should do 2 things
1) advanced ref qualifier as mentioned by peter
you should use IN so that it works for multiple users
owned_byIN
2) variable attributes add this
ref_auto_completer=AJAXTableCompleter,ref_ac_columns=asset;owned_by,ref_ac_columns_search=true,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
09-21-2023 07:26 AM
Hi @cwolfe01
Try this as reference qualifier:
javascript:
var query = "sys_class_name=cmdb_ci_computer^operational_status!=6^owned_by.sys_idIN"+current.variables.requested_for;
query;
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 07:34 AM
you should do 2 things
1) advanced ref qualifier as mentioned by peter
you should use IN so that it works for multiple users
owned_byIN
2) variable attributes add this
ref_auto_completer=AJAXTableCompleter,ref_ac_columns=asset;owned_by,ref_ac_columns_search=true,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