How does one "OR" two LABKEY.FIlter-s ?

LabKey Support Forum (Inactive)
How does one "OR" two LABKEY.FIlter-s ? Leo Dashevskiy  2012-07-09 14:22
Status: Closed
 
Specifying them in a filterArray by default creates an "AND" relationship between them, correct?
Is there a way to "OR" a subset of them, so that this subset is "AND"-ed with the rest of the filters in the arrray?

Thanks.
 
 
kevink responded:  2012-07-09 15:04
Unfortunately, it isn't possible to create an OR filter by combining other filters. The only way to do an OR is to use one of the filters that accepts a semi-colon separated list of values:

LABKEY.Filter.Types.IN
LABKEY.Filter.Types.NOT_IN
LABKEY.Filter.Types.CONTAINS_ONE_OF
LABKEY.Filter.Types.CONTAINS_NONE_OF
 
brittp responded:  2012-07-09 15:08
Assuming you're asking about the JavaScript API, note that you can also use LABKEY.Query.selectRows to write arbitrary SQL (with any filters you like):
https://www.labkey.org/download/clientapi_docs/javascript-api/symbols/LABKEY.Query.html#.executeSql

-Britt
 
Leo Dashevskiy responded:  2012-07-09 15:12
Ok, thanks guys!