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

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
ChristianAbata
Super User II
Super User II

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
v-alzhan-msft
Community Support
Community Support

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.

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

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
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 (81,630)