LogicAppsUX icon indicating copy to clipboard operation
LogicAppsUX copied to clipboard

New “Initialize Variables” grouping view breaking flows. Do not use!

Open megamax34 opened this issue 2 months ago • 2 comments

Severity

P2 - High (Major functionality broken)

Describe the Bug with repro steps

I recently saw a pop up offering to group lots of variable initializations into one convenient action and I thought "FINALLY", this or just putting them in a Scope action would be amazing. I agreed to the grouping and it completely broke the flow. The issue happens when a variable is grouped in that gets its value from another variable in the group. An example is variables:[ { "name": "var1", "type": "string", "value": "value123" }, { "name": "var2", "type": "string", "value": "@variables('var1')" }

you will get this error InvalidTemplate Unable to process template language expressions in action 'allVariables' inputs at line '0' and column '0': 'Template language expression cannot be evaluated: the template variable 'var1' cannot be found.'.

"var2" cant reference "var1" if they are grouped together in the same initialization group.

What is really frustrating is that there was no documentation around this, no change log to see what updates were made, and no warnings for the use cases.

What type of Logic App Is this happening in?

Consumption (Portal)

Are you experiencing a regression?

No response

Which operating system are you using?

Windows

Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg

Yes

Workflow JSON

It was on this action
{
  "type": "InitializeVariable",
  "inputs": {
    "variables": [
     {
        "name": "var1",
        "type": "string",
        "value": "value123"
     },
     {
        "name": "var2",
        "type": "string",
        "value": "@variables('var1')"
     }
   ]
  }
}

Screenshots or Videos

Image Image Image

Environment

Browser: Edge Version 141.0.3537.71 (Official build) (64-bit) Portal Consumption logic apps Session ID: e1bf2db521964f1488391dc6ff5b024c Version: 16.188.4.1

Additional context

No response

megamax34 avatar Oct 31 '25 12:10 megamax34

Okay somehow this got even worse. After pulling out the variables that reference other variables the logic app will automatically pull them back in.... This is not shown in the version history either. There also is no way to go back on this "feature". Every logic app I dare to touch now does this so if I save anything I risk breaking our flows. The only way around this is to tediously going through the initialized variables and delete any value references to another variable and create a set variable action for each of those under it. The variables that reference other variables in their initializations all came after the variable they were referencing. Its clear it is doing this concurrently. This is the most half baked push I have seen in a while that has HUGE risk with no way to back out.

Image Image

Why couldnt we just put variables in a scope, that is all we ever wanted.

megamax34 avatar Oct 31 '25 15:10 megamax34

You have to use Set Variable action if you dont want it pulled back into this grouping. Also I just got off with MS, here are some steps to get out of this feature. If you already made saves or edited the combined initialize variable action it will not undo that but it will prompt you for the feature again in other logic apps which you can now click "NO" and save yourself from this.

Go to Dev Tools in your browser> Application Tab> Application storage> Clear site Data

Image

megamax34 avatar Oct 31 '25 16:10 megamax34