cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
IanBrooks
Frequent Visitor

ODATA filter using And operator

Hi all,

 

I'm trying to build a flow where I get items from a sharepoint list and filter them by two or more columns, but every time I try to use the And operator in the ODATA filter, I get a bad request error. Is this just a broken implementation of filtering or am I actually doing something wrong?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @IanBrooks,

 

Could you please share a screenshot of your flow’s configuration?

Do you use the And operator in Filter Query field of “Get items” action?

Further, could you please show a bit more about the error message?

I suppose that you want to filter items based on multiple columns of SharePoint list, I think there is something wrong with your formula. Please take a try to change "And" Operator into "and" operator:16.JPG

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

10 REPLIES 10
v-xida-msft
Community Support
Community Support

Hi @IanBrooks,

 

Could you please share a screenshot of your flow’s configuration?

Do you use the And operator in Filter Query field of “Get items” action?

Further, could you please show a bit more about the error message?

I suppose that you want to filter items based on multiple columns of SharePoint list, I think there is something wrong with your formula. Please take a try to change "And" Operator into "and" operator:16.JPG

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi Kris,

 

You've answered my question, the And operator isn't supported at present, which is a real shame as it is restricting the usability of the filter. Hopefully it will come in a future update!

 

Thanks

 

Ian

Kris

Thanks for sharing the link. It is a very valuable info!

 

@IanBrooks

I guess for some reason you have discarded using Filter Array action block, right?

BR

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



@efialttesThat's correct, I didn't really have a lot of choice as it simply doesn't fit the bill for our needs at present

This is supported now. I have the following odata filter which works:

 

Frequency ne null and ApprovalStatus eq 'Approved' and TaskStatus ne 'Complete' and SelectMethod ne 'By Attribute'"

Uvais
Frequent Visitor

Is it really working now.? I tried below condition and got error message

Company eq 'Test' and Zone eq 'SW'

Is there other way to get a filtered excel row with multiple conditions.

Did you ever get this worked out?  I'm also trying to filter on multiple "eq" conditions, but I'm getting an error indicating that mutltiple conditions is not supported.  I'm using the List Rows Present in Table action within the Excel (Business) connector. 

X-off
Frequent Visitor

Thanks @efialttes 

 

Using the filter array action block is a great workaround for the "and" operator not working !

 

You made my day week !

 

Christophe

Did we ever get an answer?  It looks to me like "and" is not working in the ODATA query for filter on getting rows from Excel.

 

ODATA expression:  SubmissionMonth eq '@{triggerBody()?['SubmissionMonth']}' and Entity eq '@{triggerBody()?['Vendor']}'

400 Bad Request

Error message:  Invalid filter clause: unsupported operation. Only single 'eq', 'ne', 'contains', 'startswith' or 'endswith' is currently supported.

You could maybe try adding a calculated column directly to your sharepoint list: if (and ( ColumnA="criteria1" , ColumnB="criteria2" ), "yes" , "no"))

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (78,888)