cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dorinda
Responsive Resident
Responsive Resident

Odata Filter not working for NE

I have a flow that gets 77 rows from a SQL Get Rows V2, it works great except I do not want the first 4 rows.  I tried using this 

 

CostCategoryID ne 'CC001' or CostCategoryID ne 'CC003' or CostCategoryID and 'CC002' or CostCategoryID ne 'CC006'

 

However, I still got these rows that I dont want.  I am not sure why it is not working.  Once this runs I am creating rows in a SharePoint list with the data.

 

Any help would be appreciated.

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
tom_riha
Super User
Super User

Hello @Dorinda ,

If you don't want the 4 rows you should use AND between the conditions, not OR. And you've got once AND instead of NE (and 'CC002') in the Filter Query you shared.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

ScottShearer
Super User
Super User

@Dorinda 

Try replacing every or with and

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

4 REPLIES 4
tom_riha
Super User
Super User

Hello @Dorinda ,

If you don't want the 4 rows you should use AND between the conditions, not OR. And you've got once AND instead of NE (and 'CC002') in the Filter Query you shared.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

ScottShearer
Super User
Super User

@Dorinda 

Try replacing every or with and

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

Dorinda
Responsive Resident
Responsive Resident

Now I have this error

 

A binary operator with incompatible types was detected. Found operand types 'Edm.Boolean' and 'Edm.String' for operator kind 'And'.
inner exception: A binary operator with incompatible types was detected. Found operand types 'Edm.Boolean' and 'Edm.String' for operator kind 'And'.
clientRequestId: 9b3819fd-7731-4389-be67-7ade68837ae0

 

CostCategoryID ne 'CC001' and CostCategoryID ne 'CC003' and CostCategoryID and 'CC002' and CostCategoryID ne 'CC006'

Dorinda
Responsive Resident
Responsive Resident

Ok I fixed it and it is working thank you I had the AND in the wrong spot.

 

Appreciate the help!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,530)