cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Apply to each multiple conditions don't work

Hi Everyone,

 

I am having some problems with applying multiple filters for the apply each step. I have 2 SP lists: 1 for tracking orders to be processed, and one for keeping track of old orders. And I also have an Excel that we receive via email containing the new orders.

 

The goal is to post the new orders from the excel into the "orders to be processed" sp list, but I need to check if the orders have already been processed, basically if the order number is present in the "old orders" sp list we dont need to post it.

 

I also need to exclude blank rows from the Excel.

 

I created the 2 conditions and they work fine on their own. But if I add both, non of them work which is very strange, I am out of ideas, please help!

 

Filter for empty rows: 

length(item()?['Order Id'])   is equal to 0
Filter to exclude old orders:
I have an array variable, and check if it contains the Order Id
 
As I said, seperatly they work fine. Together, not at all. (I tried swapping the top-bottom)
conditions.PNG

 

5 REPLIES 5
ChristianAbata
Community Champion
Community Champion

hi @Anonymous  please change the condition position like the image, firts 0 and then your value.

conditions.PNG



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-litu-msft
Community Support
Community Support

Hi @Anonymous,

 

According to your descriptions of requirements, I think you want to exclude blank rows and old Order ID, so it seems like a OR relationship between the two conditions, so you should change the "AND" to "OR":

Annotation 2020-04-07 150322.png

 

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

Anonymous
Not applicable

Hi @ChristianAbata 

 

Unfortunately this did not solve the problem

Anonymous
Not applicable

Hi @v-litu-msft ,

 

This is not correct. It is clearly an "and" relationship. If you think about it, with and "OR" setting we say that they either have to be new or not blank. So if a row is not in the "old order list" but blank, that would test okay. - but just in case, I tested it, and the filter let through every row.

@Anonymous  could you try adding length(item()?['Order Id'])  in a compose action to see what is your output? please share an screanshot



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

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,534)