question

JonathanFarmer-9122 avatar image
0 Votes"
JonathanFarmer-9122 asked PramodValavala-MSFT answered

Add a value to a variable

Hi

I am trying to keep a running total of values. The logic app loops through a JSON array and I want to add the value of one of the fields to a variable. However when I try to do this I get an error saying the variable can't self reference. So what is the best way to achieve this?

azure-logic-apps
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

PramodValavala-MSFT avatar image
0 Votes"
PramodValavala-MSFT answered

@JonathanFarmer-9122 The behavior that you are observing is because the foreach loop runs parallelly by default. Running the loop sequentially should help you achieve what you need.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.