addquery Glide Record with a list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2017 12:00 PM
I'm trying to run a query on the incident_sla view.
What I'm trying to do is return all regions that match a particular value i.e Southwest.
The problem is that DOT walking seems to fail me now, where it succeeded before on reference fields that point to a string it fails when it points to a string that is type LIST
The issue seems that my nc_u_region_ids.u_region_name actually points to a data type of LIST
column label column name type reference
u_region_ids |
Is there any way to effectively query on a List?
Below is what I'm trying to accomplish in this pseudo method
- gr.addQuery("inc_u_region_ids.getDisplayValue()", "Southwest");
Or - gr.addQuery("inc_u_region_ids.u_region_name", "Southwest");

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2017 12:15 PM
List values are stored in array.
You will have to use split() function to split values and then use addQuery.
Please use below as example
http://wiki.servicenow.com/index.php?title=Referencing_a_Glide_List_from_a_Script#gsc.tab=0
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2017 12:30 PM
Do you have an example of setting up a query to a column of type 'List' in order to find a match (i.e. setting up the addQuery statement to work with a list type)? We are not trying to return the results, rather I am querying the column to try and find a match (in this case, the match would be "Southwest").
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2017 02:30 PM
Hi Adam
Would this KB Article on HI be of any help? ServiceNow KB: Interacting with a Glide List field (KB0596181)
Kind regards
Shahid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2017 10:27 AM
The ServiceNow Wiki content is no longer supported. Updated information about this topic is located here: Referencing a Glide List from a Script
Visit http://docs.servicenow.com for the latest product documentation