Multiple Variables

Kim Burata 1 Reputation point
2021-08-10T01:47:56.52+00:00

Hi,

When using multiple variables in Logic Apps, what's the best practice in doing it? Do I need to Initialise each variable I will use or is there any other way so that it doesn't take to much space on my Designer.

Thanks

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

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 69,581 Reputation points
    2021-08-10T09:18:21.743+00:00

    @Kim Burata You can refer to the create variables for saving document on the usage and how you can use different variable actions. Depending on your requirement you can either initialize individual variable or initialize as an array.

    Assuming the space that you are talking about is the JSON content generated in the code view of your logic app then based on your requirement if defining array variable helps you then you can use it else you can define as individual variable. The suggestion is only define the variable that are used later in your workflow else the unused variable that are define as part of action will still be treated as individual action in your pricing.
    As logic app is charged based on the number of actions for consumption plan and if you initialize different variable (i.e. action) and set the value later on then every action will be counted for the pricing.

    0 comments No comments