Alex Gordon
Alex Gordon

Reputation: 60691

how to replace contents of current variable?

How do I modify my variable to a value that is a function of my variable?

For example, suppose I define a variable called myBody:

enter image description here

I'd like to be able to replace the contents like so:

enter image description here

replace(variables('myBody'),items('For_each'),variables('myGuid'))

Keep in mind that I'm inside of a For_Each, meaning that for every iteration, I need to update this variable.

How can we replace the contents of a variable?

Upvotes: 0

Views: 43

Answers (1)

AdAstra
AdAstra

Reputation: 1984

I doubt that you need to use the replace action here, the "Set variable" action should suffice. Just set the Guid which you can fetch from the HTTP body, you could even define the scheme which the HTTP request receives so you don't have to store it in a defined variable/parameter. Then the Guid would be so-called 'Dynamic content'.

Http request scheme

Dynamic content

Upvotes: 1

Related Questions