Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Pass multiple values to a field in Odata for filtering

Hi All,

I have an attribute view which contains 5 field (A,B,C,D,E). Now I want to filter values from this view by passing multiples values from each field.

Let suppose :

A has values 'ONE', 'TWO', 'THREE', 'FOUR', 'FIVE'

B has balues 'ALPHA', 'BETA', 'CHARLIE', 'GAMMA', 'DELTA'

Now I want those records which has A as 'ONE' or 'TWO'.

Or those records which has 'ONE' or 'TWO' as A and 'ALPHA' as B.

Plz help me.

Regards,

Shubham Agrawal

Tags:
Former Member
replied

Hi Shubham,

to get ONE or TWO from column a add following parameter to the URL of your OData service.

unescapted: ?$filter=A eq 'ONE' or A eq 'TWO'

escaped: ?$filter=A%20eq%20'ONE'%20or%20A%20eq%20'TWO'

Regards, Florian

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question