cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jwokch
Frequent Visitor

muliplying 1 to variable itself

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'.'

powerAutomateApprovalscreen3.png

1 ACCEPTED SOLUTION

Accepted Solutions
Sundeep_Malik
Community Champion
Community Champion

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.

View solution in original post

2 REPLIES 2
Sundeep_Malik
Community Champion
Community Champion

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.

jwokch
Frequent Visitor

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.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (4,936)