Notifications
Announcements
Flow save failed with code 'InvalidVariableInitialization' and message 'The variable action 'Staff_Final_Outcomes_Initialize_variable' of type 'InitializeVariable' cannot be nested in an action of type 'Rm_Avail_Condition'.'.
The Steps I've Already Taken:
Verified placement in the IF YES branch of Budget Condition, then IF YES branch of Rm_Avail_Condition.
IF YES
Budget Condition
Rm_Avail_Condition
Attempted placing it at the absolute top level (after the trigger).
Performed a full "Export, Delete, and Re-Import" of the flow.
Solutions?
The most reliable fix is to move ALL variable initialization actions to the very beginning of your flow, right after the trigger and before any conditional logic.
Staff_Final_Outcomes_Initialize_variable
Trigger ├── Initialize variable: Staff_Final_Outcomes (default: "") ├── Initialize variable: Other_Variable (default: 0) ├── Budget Condition ├── IF YES ├── Rm_Avail_Condition ├── IF YES ├── Set variable: Staff_Final_Outcomes (actual value)
Replace the Initialize variable action with a Compose action, which can be placed anywhere.
outputs('Compose_Action_Name')
Rm_Avail_Condition ├── IF YES ├── Compose: Staff_Final_Outcomes └── Value: "Your calculated value" ├── Next Action └── Use: outputs('Staff_Final_Outcomes')
Initialize the variable at the top with conditional logic built into the default value.
Initialize variable: Staff_Final_Outcomes Default value: @if(equals(variables('Budget_Available'), true), if(equals(variables('Room_Available'), true), 'Success', 'Room_Not_Available'), 'Budget_Not_Available')
If you need different values based on conditions:
Trigger ├── Initialize variable: Staff_Final_Outcomes ("") ├── Budget Condition ├── IF YES ├── Rm_Avail_Condition ├── IF YES ├── Set variable: Staff_Final_Outcomes ("Success") ├── IF NO ├── Set variable: Staff_Final_Outcomes ("No Room") ├── IF NO ├── Set variable: Staff_Final_Outcomes ("No Budget")
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Michael E. Gernaey 473 Super User 2025 Season 2
developerAJ 174
chiaraalina 142