Hi, I'm creating an approval workflow of all approver's agreement condition. e.g,
All approvers approved -> pass
Eiter one of approver rejected -> fail
I would like to achieve this condition check by multiplying 1 to response variable (initial value 1) if approved, and multiply 0 if rejected.
After review step finish, target variable will remain 1 if all approved. It will become 0 if anyone rejected.
Please help me to proceed this simple multiply calculation in set variable action.
I tried
mul(variables('responseCollection'),1)
and receiving error below;
Flow save failed with code 'WorkflowRunActionInputsInvalidProperty' and message 'The inputs of workflow run action 'multiply_1' of type 'SetVariable' are not valid. Self reference is not supported when updating the value of variable 'responseCollection'.'
Thanks! Now I found self referencing is not possible.
This program is providing array value check feature instead. I can easily check my target condition by appending each responses then proceed array value check.
Hey @jwokch
Self referencing is not allowed in power automate, that is you cannot multiply the same variable with itself.
Instead you can just write
mul(1,1) in the left side and mul(1,0) on the other side.
Or you can also try this.
Make 3 variables. Set value of 1 as one, another's 0 and for the result just multiply with the respective variable.
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional