azureworkflowazure-logic-appsazure-logic-app-standard

Is there any way to get all the Action names present in a Try block in Logic Apps


Is there any way to retrieve the action names within the try block? I need to obtain these action names and create a string with them separated by commas. How can I achieve this?

Tried the below but not working

@actions('Try').actions

Solution

  • You need at least 2 actions for this.

    Firstly, you need to use the Select action to get the names of the actions within the "Try" block as an array:

    Outputs of Select

    You should be selecting @item()?['name'] from @result('Try').

    Code View of Select

    Secondly, you need to transform the array to a comma-separated string. You can use the join function for this: @join(body('Select'), ',')

    Outputs of Compose

    Code View of Compose