cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vsolanon Helper III
Helper III

Combine multiples Or and And in the Filter Query (Get Item

Hi Experts!

 

I am trying to apply the below logic to the Filter Query, however, it is not working. When I run my Flow, it doesn't bring any information.

(SSNReceived eq 'No' or SINReceived eq 'No') and (GeneralStatus eq 'In Process' or GeneralStatus eq 'Completed')

 

I have three columns within the SP List:  (1)"SSNReceived" which is a single line of text column, (2)"SINReceived" which is a single line of text column and  (3)"GeneralStatus" which is a choice column.

Could you please how can I bracket these statements? I have tried multiple ways without success,

 

Thank you in advance 🙂

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Combine multiples Or and And in the Filter Query (Get Item

Hi @vsolanon 

 

i tried to replicate your issue and its working for me :

my setup:

List - Sample List

TextCOL - Text column

TextCOL2- text colum

CHSCOL- choice column

my list has 5 items , and after applying filter i get only 2. 

I would suggest you to run the get items with no filter and check how the values are getting returns in the columns that you are using for filter.

filterquery.pngfilterquery2.png

 

 

 

 

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Combine multiples Or and And in the Filter Query (Get Item

hi @vsolanon  in my experience you can add just one conditional just and/or

If you try

SSNReceived eq 'No' or SINReceived eq 'No'

 

Sure this is going to work well.



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
Community Support
Community Support

Re: Combine multiples Or and And in the Filter Query (Get Item

Hi @vsolanon ,

 

I suggest that you could take a try with the filter Array action as my screenshot below:

1.png

 

The expression in the Filter Array as below:

 

@and(or(equals(item()?['SSNReceived'], 'No'), equals(item()?['SINReceived'], 'No')),or(equals(item()?['GeneralStatus']?['Value'], 'In Process'), equals(item()?['GeneralStatus']?['Value'], 'Completed')))

 

 

Best regards,

Alice       

 

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

Super User
Super User

Re: Combine multiples Or and And in the Filter Query (Get Item

Hi @vsolanon 

 

i tried to replicate your issue and its working for me :

my setup:

List - Sample List

TextCOL - Text column

TextCOL2- text colum

CHSCOL- choice column

my list has 5 items , and after applying filter i get only 2. 

I would suggest you to run the get items with no filter and check how the values are getting returns in the columns that you are using for filter.

filterquery.pngfilterquery2.png

 

 

 

 

View solution in original post

Highlighted
vsolanon Helper III
Helper III

Re: Combine multiples Or and And in the Filter Query (Get Item

Thank you all for the comments!

 

Kindly note today I open today the Flow and delete and paste the formula in the FilterQuery..it runs and it work like a Charm! 🙂

 

As @DeepakS mentioned, I verified the values used in the FilterQuery and noticed they were correct 🙂

 

 

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (2,496)