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 02:22 PM
Please use below sample code to query glide list variables for business rule
var proj = new GlideRecord('pm_project');
//proj.addQuery('u_idea',current.sys_id);// add your code
proj.query();
while(proj.next()){
var list = current.u_users.getDisplayValue();
var array = list.split(",");
for (var i=0; i < array.length; i++) {
//gs.print("Reference value is: " + array[i]);
if (proj.watch_list = array[i]{
// add your code
}
}
Regards,
Sachin