Converting a URL-encoded filter to a LABKEY.Filter - is there a quick and easy way? | Jon (LabKey DevOps) | 2015-04-27 20:56 |
Status: Closed | ||
Hi Leo, You're right. Looking at our API documentation, I'm not seeing anything that would convert a string into a filter. I can submit a feature request for you, but can you give me an example of how you expect this conversion to happen? Specifically, how should the API call look? Below is a basic example of what a regular filtered query looks like via the Javascript API. Can you provide an example of what your conversion string-based filter would ideally look like? LABKEY.Query.selectRows({ schemaName: 'lists', queryName: 'People', success: onSuccess, failure: onFailure, filterArray: [ LABKEY.Filter.create('FirstName', 'Johnny'), LABKEY.Filter.create('Age', 15, LABKEY.Filter.Types.LESS_THAN_OR_EQUAL) LABKEY.Filter.create('LastName', ['A', 'B'], LABKEY.Filter.Types.DOES_NOT_START_WITH) ] }); Regarding the Rlabkey package and the makeFilter operation order of "Column/Operator/Value", it looks like the Javascript API and Java API work as "Column/Value/Operator" while the Rlabkey, Perl, and Python APIs use the "Column/Operator/Value" order. If the APIs were to be changed, they would have to provide backward compatibility to allow existing queries to work. Regards, Jon |
||