Query Operator Limitation (is one of)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2017 11:50 PM
I am using a client script and script include to send dynamic values to set filter in a slushbucket.
The filter applied on it something like "ID is one of" . Now here are more than 8000 IDs which should have been filtered, but it only shows 500 in the filter.
Is there a limitation on "is one of" logical operator? If yes, then is there any alternative way of doing this?
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2017 11:53 PM
Oh wow. 8K sounds like quite a big list to compare against on every query.
Would you mind sharing more about your scenario/use case to advice how else you could do it?
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2017 12:01 AM
There is a client script that runs on onLoad.
We have a Employer table, which has a related list of employees. When you click on the "edit" button the client script is setting the filter using below query
var ga = new GlideAjax('employeeID');
ga.addParam('sysparm_name','getID');
ga.addParam('sysparm_companyID',companyID);
ga.getXMLWait();
var employeeID = ga.getAnswer();
var y = GlideList2.getListsForTable("u_employees")[0];
y.setFilter("");
y.addFilter("u_idIN"+employeeID.join(',')); // This shows only 500 records
y.refresh();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2017 12:08 AM
Hi Pooja,
It sounds like you could do it the other way around. You could filter all employees (u_employees) for which the employer is XYZ.
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2017 12:09 AM
That's assuming that your table u_employees has a field that makes reference to the employer. If it doesn't have such a field, then this could be a good moment to add it in there
Thanks,
Berny