cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
mboonie
Level 8

Condition Actions are suddenly triggering Cancel

Help!

I am at a complete loss as to why this is happening, but starting today, several random conditions in my two-step Approval workflow are randomly crapping out and returning "Cancel." 

I haven't touched that part of the workflow in a month. When I did, it was because my "trigger got corrupted" (meaning my credentials had expired... a phenomenon that MS concluded was a 'tenent issue,' since 365 is supposed to perpetually renew them.) So, I made copies of the workflow--which apparently is the approved way of dealing with that, other than recreating them from scratch--and all seemed right with the world.

Until today.

Regarding the Conditions that are inexplicably returning Cancel (and stopping my workflow):

  • One condition is "blnNewRequest Is equal to True"
  • The variable blnNewRequest is set to the value of a Yes/No field in a SharePoint list
  • The other is checking the result of an Approval: "Outcome Is equal to Null"
  • The variables being evaluated are properly defined and set, and have actually been used in previous steps (so, No, it's not an issue with the type of variable, etc.)

I tried to circumvent the '...Is equal to Null' error by changing it to "...Is not equal to Approve AND Is not equal to Reject" (just in case things get sketchy working with Nulls); but for the second one, I have no idea how to otherwise check whether a boolean is False (nor should I!) I can understand throwing an actual Error (e.g. comparing a boolean to a string value), but Cancel?

This workflow had been running without a hitch for months. Suddenly... ???

This is NOT a good thing, particularly if I can't anticipate when or why it's going to fail.

 

1 ACCEPTED SOLUTION

Accepted Solutions
mboonie
Level 8

Re: Condition Actions are suddenly triggering Cancel

I definitely used the Null expression, at least at first. I have since changed it to avoid working with Null as a comparator:did request timeout.png

 

This seems to be more reliable.

I also made sure to use an expression for the initial comparison (blnNewRequest is equal to true). I set the variable earlier, like this:

set blnNewRequest variable.png

...but then I attempt to check the value, like this:

Is blnNewItem eq True.png

...and it craps out with 'Cancelled'????

Cancel instead of No.png

 

The most bizarre thing is that it doesn't always happen, and when it DOES happen, it's when the value is false. I'm at a complete loss trying to trouble-shoot something I can't always reproduce.

 

Update (but still not resolved to my satisfaction): I tried to work around the issue by switching to a floating variable, using 0 and 1 instead of true and false. The bottom line seems to be that, if I store the number 0 in a floating variable AND I wrap it in a value() expression in the condition, it then seems to work.

 

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: Condition Actions are suddenly triggering Cancel

Hi @mboonie,

 

Do you configure your Flow like the following?

 

"blnNewRequest Is equal to true" not "blnNewRequest Is equal to True":

Annotation 2019-10-10 131736.png

The null input through the Expression:

Annotation 2019-10-10 132246.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.

mboonie
Level 8

Re: Condition Actions are suddenly triggering Cancel

I definitely used the Null expression, at least at first. I have since changed it to avoid working with Null as a comparator:did request timeout.png

 

This seems to be more reliable.

I also made sure to use an expression for the initial comparison (blnNewRequest is equal to true). I set the variable earlier, like this:

set blnNewRequest variable.png

...but then I attempt to check the value, like this:

Is blnNewItem eq True.png

...and it craps out with 'Cancelled'????

Cancel instead of No.png

 

The most bizarre thing is that it doesn't always happen, and when it DOES happen, it's when the value is false. I'm at a complete loss trying to trouble-shoot something I can't always reproduce.

 

Update (but still not resolved to my satisfaction): I tried to work around the issue by switching to a floating variable, using 0 and 1 instead of true and false. The bottom line seems to be that, if I store the number 0 in a floating variable AND I wrap it in a value() expression in the condition, it then seems to work.

 

View solution in original post

mboonie
Level 8

Re: Condition Actions are suddenly triggering Cancel

To be clear, part of my confusion arose from the way that the "Cancelled" value from a Terminate nested inside another If nested inside a "parent" If cascades UP to the top of the decision tree (the parent If.)

 

The logic itself turned out to be fine, but I was not used to seeing the value "Cancelled" bubble up from inside. (I am pretty certain that it didn't always manifest that way, or I suspect I would have had the same concern when I saw it before.)

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,727)