Hi. I am trying to get filtered data from my table in PowerAutomate using Filter Odata query but I am unable to use the OR function to get multiple filters. I am able to use each function independently but if it does not work if I try to get an output using the OR function. Can someone please advise how to use it correctly.
These functions work independently (Here 'City' and "CompanyName' are the fields that are inputs and City & CompanyName are from the table)
contains(City,'City')
contains(CompanyName,"CompanyName')
but if I try to combine it using OR function as below, it does not work in either of these 2 options that I try
OR(contains(City,'City'),contains(CompanyName,"CompanyName'))
contains(City,'City') OR contains(CompanyName,"CompanyName')
Will appreciate if someone can suggest a solution. Basically, I want to use multiple filters to get the relevant data from a table before processing it
Thank you evbelda
Finally I found a solution when using filter query. Manualy you should put in the filter Array block:
(I understand that you are trying to filter contains "Info requested" OR "LT requested" in the filter:
@Anonymous(Contains(Status, 'Info resquested'),Contains(Status,'LT resquested'))
Hi,
I'm trying to apply more than one option on the filter, but without success.
this is what I have.
I will have to apply another filter for another column, can some one help me it this?
thank you in advance
Rui
Hi,
The problem is with contains and excel:
City eq 'City' Or CompanyName eq 'CompanyName' it works
City eq 'City' Or contains(CompanyName, 'CompanyName') it doesn't work
contains(City,'City') Or contains(CompanyName, 'CompanyName') it doesn't work
why with multiple choices with contains it doen't work?
Hey Mate,
Excel has always been stubborn, So I user Filter array action and then pass Multiple condition(It always works for me)...
@or(equals(item()?['Country'], 'US'),equals(item()?['Count'], '3'))
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Hi @yashag2255 Thanks for your response. I am using Excel so that could be the reason I am not able to use more than 1 operator.
Can you elaborate more on the solution that you have suggested about using the columns for filtering.
On Filter array, I am very new to PowerAutomate, so don't have complete knowledge how to use it. If you can share some links for the same, will appreciate.
Hi @yashkamdar . Thanks for your response. Unfortunately, the OR function is not working in either way you have suggested.
Hi @umangsr
Can you share more details on the data source? If you are using excel, note that this connector has a limitation and can have only one 'eq', 'ne', 'contains', 'startswith' or 'endswith' operation. (source)
One work around for this could be to use one of the columns to filter in the OData itself and then use a condition in Power Automate for the other one.
You could also try using the filter array action for this.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Hello Team,
I think you are trying to complicate this, you can simply use an OR'ing like this in OData filter query -
City eq 'City' Or CompanyName eq 'CompanyName'
Here 'City' and 'CompanyName' are dynamic contents.
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
WarrenBelz
146,731
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,075
Most Valuable Professional