Skip to main content
Community site session details

Community site session details

Session Id : IK85FhVylgKy2wxvWY1USt
Power Automate - Building Flows
Answered

Apply to each conditions resulting incorrect values

Like (0) ShareShare
ReportReport
Posted on 31 Oct 2022 14:39:01 by 50

Trying to Apply to each conditions to results of the Filter Array which as a result returns 'true', which should be 'false'.

 

For example:

empty(items('Apply_to_each')?['Supplier Name']) is equals to TRUE

Should return False, but returns True

 

I have another flow which was setup exactly the same and returned values are correct.

 

Please help to identify what I'm missing out.

 

Conditions:

 

Conditions.png

Results:

 

Results.PNG

 

  • EugeneKreger Profile Picture
    50 on 02 Nov 2022 at 09:26:03
    Re: Apply to each conditions resulting incorrect values

    There was no reason to use apply to each inside another apply to each, steps further down the line didn't bother me at the time, because the flow was failing above. It is now corrected, I used 'contain' instead of 'equals'.

     

    Anyway, thanks for few more ideas, I really appreciate that.

  • nwmb Profile Picture
    13 on 01 Nov 2022 at 20:11:33
    Re: Apply to each conditions resulting incorrect values

    Hey -

     

    Is there a reason you're using an apply to each inside of an apply to each?  It looks like your outer "Apply to each" is using the results of your filter array above, but the inner loop that sends the email is using a different data source (the green Excel icon).  It seems as though those fields should be coming from your apply to each result

    When I have trouble with conditions, sometimes I'll drop in a Compose and write the value of the field (e.g. items('Apply_to_each')?['Supplier Name']) and check that it's what I expect.  Then you can put a formula in the compose (e.g. not(equals(items('Apply_to_each')?['Supplier Name'],'Bradgate ') and check that is resolving correctly to true/false.  The conditions can be quite a pain sometimes but composes will be your friend!

  • Verified answer
    EugeneKreger Profile Picture
    50 on 01 Nov 2022 at 11:19:11
    Re: Apply to each conditions resulting incorrect values

    Although, the problem partly solved, yet not fully.

     

    I have this condition which was causing misbehaviour, but cannot figure out correct syntax to make it working.

     

    The condition is looking up for Supplier Name value of 'Bradgate ' (bear in mind space after supplier name) and if finds something else should trigger 'True', so far resulting in FALSE.

     

    Condition.png

  • EugeneKreger Profile Picture
    50 on 31 Oct 2022 at 16:40:25
    Re: Apply to each conditions resulting incorrect values

    Thanks for the clue, you where absolutely right. I have found the condition which was causing misbehaviour.

  • Verified answer
    nwmb Profile Picture
    13 on 31 Oct 2022 at 14:54:41
    Re: Apply to each conditions resulting incorrect values

    Since you have three conditions with "OR", is it possible that one of your other three conditions is resolving to true and not the first condition?  If you remove condition 2 & 3, does it still resolve as true?

     

    It looks right on the surface!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete