0
votes

I have an Azure Logic app with an if/else conditional. In each branch I have a compose action to create some JSON. The true branch has compose and the false compose_2. After the conditional I want to send a message to a queue with the output from either branch but how do I reference the output? I have two actions("compose") and actions("compose_2"). Is there any way I can reference the output with a single variable/property name?

1
Isn't it possible to use the initialize and set variables actions? You would use initialize before the if/else action and the set variable in both branches of the if/else. - Pieter Vandenheede

1 Answers

2
votes

It is possible by using @result() which will return all the output of a scope (Condition in your case) as an array, and you can use @coalesce to find out the non-empty value between Compose and Compose_2.

However, I would use variable instead:

  • Declare an variable before Condition
  • Set the variable in each branch
  • Reference the variable after Condition