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!


View solution in original post

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.

View solution in original post

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!


View solution in original post

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.

View solution in original post

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Coming Soon: T-shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

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

Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors
Users online (6,063)