Query Operator Limitation (is one of)

poojasingh
Giga Contributor

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?

6 REPLIES 6

bernyalvarado
Mega Sage

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


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();


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


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