cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
POJA85
Helper I
Helper I

OData filter with multiple AND and OR

Hello everyone, really need someone to look at this query because I can't see what's wrong here. 

 

I am using the following List Rows OData filter on the Dataverse table Opportunities:

 

statecode eq 0 and hx_orderid eq null and (hx_orderstatus ne '1100' or hx_orderstatus ne '1110' or hx_orderstatus ne '1120')

 

Both hx_orderid and hx_orderstatus are text fields and I want to list every row where:
Active,

hx_orderid is empty,

and hx_orderstatus should not equal 1100, 1110 or 1120. 

 

But it ignores the last part and lists these orderstatus rows. 

1 ACCEPTED SOLUTION

Accepted Solutions
POJA85
Helper I
Helper I

Ok it seems like I finally found a solution (even though I feel the other version should have also worked). 

 

statecode eq 0 and hx_orderid eq null and not contains(hx_orderstatus,'1100') and not contains(hx_orderstatus,'1110') and not contains(hx_orderstatus,'1120')

View solution in original post

1 REPLY 1
POJA85
Helper I
Helper I

Ok it seems like I finally found a solution (even though I feel the other version should have also worked). 

 

statecode eq 0 and hx_orderid eq null and not contains(hx_orderstatus,'1100') and not contains(hx_orderstatus,'1110') and not contains(hx_orderstatus,'1120')

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,041)