Trying to Add more than 2 variables in Logic App Cosmos DB

Advertisements

Requirement in Logic App : Need to add 4 variables into a single variable.

I am using the expression Add(Variable1, variable2, variable3, variable4)

But it throws the below error.

Is there any other way to add 4 variables(int).

>Solution :

Compound them, i.e. use this concept …

add(add(add(variables('Number 1'), variables('Number 2')), variables('Number 3')), variables('Number 4'))

This test flow …

… gives me this result when I add them using that compound approach …

However, if the amount of numbers you’re adding is dynamic, you may need to loop.

Leave a ReplyCancel reply