cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User
Super User

Condition in Apply to Each Result is False but Seems to Return True

Hi All.

I am getting data from a SharePoint List and running the following condition on the values within an "Apply to each"

and(equals(string(items('Apply_to_each_Live_Status')?['status']), 'Live'), not(equals(string(items('Apply_to_each_Live_Status')?['attachmentId']), ' ')))

I have also tried

and(equals(items('Apply_to_each_Live_Status')?['status'], 'Live'), not(equals(items('Apply_to_each_Live_Status')?['attachmentId'], null)))

And ...Capture-127.png

All of the above rshould be elementary in a sense, as all conditions should do the same thing (almost) but the issue I am noticing is that regardless of which format my conditions and expressions are in, it returns false for both of the items in my SharePoint List, each try from the Apply to each: Capture-128.png

The above shows what data both columns hold and the expected result of these conditions is to return false, which it does. However my Flow continues on to the next step  and then updates the SharePoint list at the end.

The images below should demonstarte that false is returned on both but my Flow seems to behave as if it has returned true.Capture-125.png

 

Capture-126.png

You can see from the red outline around the Condition called "Condition We Can Construct a DELETE Request" that it has got as far as this step, despite each of the 2 prior returning false. surely this Flow should terminate as my others normally do?

Am I missing something plainly obvious here or is this behaviour not the norm? 

I just can't get manage to fathom out why an apply to each will return false but then behave as if it returns true.

 

Thank you in advance for taking the time to look at my issue.

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Condition in Apply to Each Result is False but Seems to Return True

Hi All.

For clarity on this post, and thanks to @Laskewitz for lending a second set of eyes.

When using the yes branch, the Flow works as expected. It seems to me that in the past, maybe I have been exploiting what may be explained as a bug. if I weren't to explicitly use the yes branch and the Flow returned true it would continue. When returning False and utilising the No branch, it terminated. But on this one, the experience has been diferent. All good though!

 

No additional information required on this post and a lesson learned for me.

Always use the yes and no branches on the condition as this is how things should work anyway. 

 

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Super User
Super User

Re: Condition in Apply to Each Result is False but Seems to Return True


Always use the yes and no branches on the condition as this is how things should work anyway. 


This is really important. The yes and no branches in the condition usually help you a lot. :-)


Glad to have helped @AlanPs1.

2 REPLIES 2
Super User
Super User

Re: Condition in Apply to Each Result is False but Seems to Return True

Hi All.

For clarity on this post, and thanks to @Laskewitz for lending a second set of eyes.

When using the yes branch, the Flow works as expected. It seems to me that in the past, maybe I have been exploiting what may be explained as a bug. if I weren't to explicitly use the yes branch and the Flow returned true it would continue. When returning False and utilising the No branch, it terminated. But on this one, the experience has been diferent. All good though!

 

No additional information required on this post and a lesson learned for me.

Always use the yes and no branches on the condition as this is how things should work anyway. 

 

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Super User
Super User

Re: Condition in Apply to Each Result is False but Seems to Return True


Always use the yes and no branches on the condition as this is how things should work anyway. 


This is really important. The yes and no branches in the condition usually help you a lot. :-)


Glad to have helped @AlanPs1.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 166 members 4,375 guests
Please welcome our newest community members: