CRM API Search Filter

The documentation for filters is confusing. I am trying to create the following scenario ‘(A or B) and c’, where ‘or’ takes precendence over ‘and’. Please let me know how to handle this kind of scenario using filter and filtergroups?

@CS4

Hi.



  • To apply AND logic, include a comma separated list of conditions within one set of filters.
  • To apply OR logic, include multiple filters with a filterGroup.

How about `(A and C) or (B and C)`?

"filterGroups": [
 {
 "filters":[ A ],
 "filters":[ C ]
 },
 {
 "filters":[ B ],
 "filters":[ C ]
 },
]

Thanks.

Hi skimura,

Thank you for the response. But I am still trying to figure out how to apply for the scenario (A or B) and C?

"filterGroups": [
 {
 "filters":[ A ]
 },
 {
 "filters":[ B ]
 },
]

This will give (A or B). How shall I apply and operation for (A or B).

@CS4

I don’t think you can do it in this order because filter group cannot included in filter.

(same order: meens ‘(A or B) and C’)

But are’t ‘(A or B) and C’ and ‘(A and C) or (B and C)’ the same?

Thank you @skimura . I somehow missed your first response of expanding the condition which is same as what I was asking. I got the it clarified.

Hey, @CS4 :waving_hand: Thanks for letting us know you got it worked out :raising_hands: — Jaycee