I have an automation that suddenly stopped working properly with variables.
I declare all my variables at the top before doing anything else.
I set them all to _EMPTY
I have a set of IF....ELSE where the variables are set in each condition.
Logging the value inside the IF...ELSE ; the contents are correct
As soon as it drops out of the IF...ELSE... the values are back to _EMPTY
Now this worked for ages without issue, but over the last few week it is now failing.
Has anything changed in regard to variables?
Hi @Myles Boyd
FYI -- For longer rule images, it helps to use a screen capture tool or browser addon which supports scrolling page capture. This reduces the risk of the rule image / context getting out of synch.
I just re-tested my example rule (similar to yours) to validate the scope of variables with conditions and it worked: when a variable is re-created in an if / else block the new value is present after the conditional block./
Please post an image of your audit log details showing the execution as that may help explain what is happening. Until we see that...
Have you validated your has not been updated by others and that the variable names exactly match for all usages?
And, the rule you show uses the Send Web Request action and apparently has apparently disabled the option "Continue running the rule even if the request response is not successful".
Is the other option enabled to wait until done: "Delay execution of subsequent rule actions until we've received a response for this web request"?
Kind regards,
Bill
7/05/2025, 16:45:16 54893560643 CHG: Set Reporter Details
SUCCESS
16.80s
Show less
Field value changed
27/05/2025, 16:45:16
{{smart values}} condition
27/05/2025, 16:45:16
{{smart values}} condition
27/05/2025, 16:45:17
Work item fields condition
27/05/2025, 16:45:17
Create variable
27/05/2025, 16:45:17
Create variable
27/05/2025, 16:45:17
Create variable
27/05/2025, 16:45:17
Create variable
27/05/2025, 16:45:17
Create variable
27/05/2025, 16:45:17
Create variable
27/05/2025, 16:45:17
Re-fetch work item data
27/05/2025, 16:45:17
Send web request
27/05/2025, 16:45:18
CONDITION
If block
27/05/2025, 16:45:22
Else block
27/05/2025, 16:45:22
Send web request
27/05/2025, 16:45:22
{{smart values}} condition
27/05/2025, 16:45:23
{{smart values}} condition
27/05/2025, 16:45:23
Create variable
27/05/2025, 16:45:23
Create variable
27/05/2025, 16:45:23
Create variable
27/05/2025, 16:45:23
Create variable
27/05/2025, 16:45:23
Create variable
27/05/2025, 16:45:23
Log action
27/05/2025, 16:45:23
Log
Manager from Okta: will.reddin@zzzz.xx
Edit work item
27/05/2025, 16:45:23
Log action
27/05/2025, 16:45:22
Log
Manager: _EMPTY
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That appears to show the rule entered the first if / else block. Is that correct? It is difficult to know without seeing the actual image of the log.
Please post images of the following:
And, what is the purpose of the Re-fetch Work Item Data action in your rule?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.