Showing results for 
Search instead for 
Did you mean: 

Allow the variable in set variable to reference itself in a function

When setting a variable using a function that needs to reference the current value for the variable, currently it has to be done in two steps, using compose, then set variable.


The error "Self reference is not supported when updating the value of variable 'xxxxx'"


It should be possible to update a variable with a function of the existing variable value.


This is particularly the case when you want to add a property to an existing JSON such as:

set variable XXX = addProperty(variables('XXX'),'key','value')


It should be possible to self reference when setting a variable.

Status: New