Variables in Flow can be painful! They clutter the flow with many initialize actions.
How can we make variables easier.
I was thinking about to make variables manageable outside the flow. So not as an action but as a configuration setting on the flow.
In one conversation with Stephen I asked this - I was asking why variables are slow inside a For-Each loop.
He says because loops can run in parallel, the variables must obtain lock first and then release it. In fact, because any part of a Flow can be inside a parallel branch, I believe all set-variable first obtains global lock.
Ever since that conversation, I try very hard not to use variables. Compose can be quite good for quick throw away local variables.
There are still times where variables are needed though, appending/concatenating values into a result, and because variables have a defined type - the editor works nicer with them as well.
One of the main reasons for me to suggest this option is that it will also make it possible to use variables in triggers. So for example being able to just create a copy, adjust a variable value (so wihtout the need to chnage the flow!) and the flow will for exmaple trigger on a different list in SharePoint would be helpful.
I'd like to see the ability to create Variables within Scopes, this would allow you to create temporary variables where they are needed, accessible within the scopes only rather than declaring them as Global variables at the top of the Flow.
Scopes are great for keeping Flows nice and tidy, grouping relevant actions together under a common heading, but having to declare variables outside of the scope clutters the Flow more than it really should.
I'd like a method of declaring variables in block. Single step with many variables being initialized
I would agree with both @Dcurran12 and @Anonymous that some way of grouping into a scope or variable block would help in tidying this all up