Showing results for 
Search instead for 
Did you mean: 

Ability to 'Initialize variable' at any level

"The operation 'Initialize variable' can only be used at top level."




It sometimes makes sense to be able to initialize a variable within a condition.  Otherwise, we have to initialize variables at the start of a flow, and they're not always going to be set - especially in more complicated flows with lots of conditions (especially nested ones).  Can we please change it so that a variable can be initialized at any level in the flow.



Status: New
Level: Power Up

I'm new to Flow, but 100% agree. My first flow has a page and a half of variables. Some used as constants; some used as text buffers that will be built up over the course of the flow; some are counters, incremented in loops.


Compose can create arbitrary objects, but they appear to be read-only. Or at least cannot be used with data actions such as append string action or increment integer


One would have thought that the control activity Scope would at least live up to its name. Alas, you cannot create variables that have scope of only the Scope.


I'm probably missing something, and perhaps should learn how to better leverage Compose. Pointers are appreciated.