PowerAutomate: Self-reference is not supported when updating the value of variable

Ajit PatraDyn365CE4 years ago46 Views

We often come across requirements in which we want to add certain value to the same variable e.g. for integer variable, x=x+5 or for string variable, test=test+”additional”.

We were trying to achieve the same thing using PowerAutomate. However, while doing this using Set Variable action, we got an error saying “Self-reference is not supported when updating the value of variable”.

Below is what we were trying to do inside Apply to each action and the expression is: add(variables(‘Service Delivery Type Total Amount’),items(‘Apply_to_each_Service_Delivery_Type’)?[‘dxc_amount’])

As this is not possible using PowerAutomate at the moment, we achieved it using another variable of same type in the middle as shown below:

And, inside Apply to each action, we added the following Set Variable actions:

Expression for the above action: add(variables(‘Dummy Service Delivery Type Amount’), items(‘Apply_to_each_Service_Delivery_Type’)?[‘dxc_amount’])

Hope it helps !!

Original Post https://ajitpatra.com/2020/09/23/powerautomate-self-reference-is-not-supported-when-updating-the-value-of-variable/

0 Votes: 0 Upvotes, 0 Downvotes (0 Points)

Leave a reply

Join Us
  • X Network2.1K
  • LinkedIn3.8k
  • Bluesky0.5K
Support The Site
Events
March 2025
MTWTFSS
      1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31       
« Feb   Apr »
Follow
Sign In/Sign Up Sidebar Search
Popular Now
Loading

Signing-in 3 seconds...

Signing-up 3 seconds...