Okay, before you answer with a 'Compose' let me explain the situation. My frustration is high at the end of the week so I hope the community can lend some support over the weekend so I may come back on Monday with some hope.
Problem:
With Power Automate and 'Variables' they are basically considered 'Global variables' on the flow. Because of this you are required to 'initialize' them outside any Scope or loops. In most cases variables are utilized to hold onto data and reference it inside loops, conditions, or the like. Think of a situation where the variable could be true or false depending on a condition, then later in the flow/loop you need to output the true or false. You can't do this with compose or individual actions because you would need to know which action to reference, the true action or false action.
My particular issue is that I have a complex flow. It has multiple variables and variable types. I have a string variable with HTML that is appended to, string variables that are updated or changed based on conditions, and null values that get filled in during the process. I also have a foreach loop that processes the data concurrently, because of this the variables are overwritten at different points in the process manipulating the data.
Solution???
I know that 'Compose' is what everyone says to use, but that would only work if literal references were possible. It won't work if i use conditions, it won't really work if i need to append string to them. All of it comes down to compose needs a direct reference and the whole point of using a variable is to avoid that.
I am drawing so many blanks and dead ends. Any help would be greatly appreciated.