cancel
Showing results for 
Search instead for 
Did you mean: 

How to apply multiple filter in Odata query?

sharathnasa
Explorer
0 Kudos

Hi All,

I'm trying to apply multiple query in a single query as shown below. But i'm not getting the correct syntax on how to apply.

https://my338727.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/LeadCollection?$filter=ID eq '149301'&$filter=OwnerPartyID eq '149301'

If anyone knows the correct syntax on how apply this, please let me know.

Regards,

sharath

Accepted Solutions (0)

Answers (3)

Answers (3)

DebashishDas
Active Participant
0 Kudos

You don't need to use $filter every time.Use 'and' for multiple parameter.

former_member226
Employee
Employee
0 Kudos

Hi,

You can do the filtering for multiple parameter using following:

https://my3XXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/LeadCollection?$filter=ID eq '25139' and OwnerPartyID eq '8000000000'

Thanks

Saurabh

bnienhaus
Explorer
0 Kudos

Hi Sharath,

I believe this question has already been answered here (among others)

In general, OData requires that you pass multiple arguments in one filter using operators like "and" / "or".

Please check the forum for similar questions prior to posting.

Best Regards,

Brian

sharathnasa
Explorer
0 Kudos

Hi Brain,

Prior to posting i had already check the post link which you have shared. That question is more about single filter value with multiple values. Not with multiple filters.

Regards,

Sharath