Logic apps change value of parameters

Rafał Lesiński 20 Reputation points

I am creating a flow in Logic Apps and I need a variable that will be a counter for flow executions. I decided to use a parameter for this, but I don't know how to change its value while executing the flow. There is no such thing as set the value of a variable, e.g. set the value of a parameter. Is such an activity possible? I use consumtion logic app.

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,923 questions
0 comments No comments
{count} votes

Accepted answer
  1. MayankBargali-MSFT 69,841 Reputation points

    @Rafał Lesiński Thanks for reaching out.

    Unfortunately, you cannot use parameter/variable to achieve this. You need to offload and store your counter outside logic app like storage account blob. In your workflow you can retrieve the value from your storage blob, increment it and then update your blob with the new value. Make sure you are setting the degree of parallelism to 1 after enabling the concurrency control in your trigger setting else in scenario when multiple requests came at the same time then your counter may not update the right value as multiple run id could access the same data/update it.

    To get familiar with blob storage connector please refer to this document.

    Feel free to get back to me if you have any queries or concerns.

    Please "Accept Answer" if the answer is helpful so that it can help others in the community.

0 additional answers

Sort by: Most helpful