Add a value to a variable

Jonathan Farmer 96 Reputation points
2021-04-30T15:32:13.69+00:00

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
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,162 questions
0 comments No comments
{count} votes

Accepted answer
  1. Pramod Valavala 20,636 Reputation points Microsoft Employee
    2021-05-03T07:02:10.323+00:00

    @Jonathan Farmer 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.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.