Discussions
Filtering 'and's and 'or's in the /query rest api end point
2 days ago by Calvin Nguyen
Hello team,
Can someone help provide more information on using nested filters for both and & or operations in a single query
We are trying to achieve the following filter for the AssetTree entity
Parent ID = '1' AND (Child.ModelId = '1' OR Child.ModelId = '2')
This is currently what we have and are unsure how to implement the OR part of the filter
{
QueryExpression: {
Criteria: {
Conditions: [
{ PropertyName: 'ParentId', Operator: 'Equal', Values: ['1'] },
{
PropertyName: 'Child.ModelId',
Operator: 'Equals',
Values: ['1','2'],
},
],
FilterOperator: 'And',
},
Distinct: true,
PropertySet: { Properties: ['*'] },
Count: 100,
FirstResultIndex: 0,
},
}
and is there a list/link of the query operators and associated query requirements I can reference
This link: https://securecontent.corrigo.com/docs/HelpCE97/html/d786bdd6-28db-1201-0219-9af52ea6fb82.htm is available on the executing query page (https://developer.corrigo.com/reference/queryexpression) however it returns a 404 when selected
Thanks
