How to reference the output of a repeat item action in relation to the repeated inputs? RRS feed

  • Question

  • For example; I have 3 actions:

    Action 1: output produces 6 entries in a list (with unique IDs)

    Action 2: repeats over action 1's output, produces a list of 'results' for each as an output list of 6 entries.

    I now want to use Action 3 to update the items using their ID output from Action1 with the relevant result from Action2.

    In psuedocode; I'd do something like this to set the 6 results iteratively : MyItems( action1.outputs[x].id ) . results = Action2.outputs[x]

    I'm unsure of the syntax in Logic Apps to achieve this, any help appreciated!


    Tuesday, April 7, 2015 5:18 PM


  • Currently there is no build in solution to support such a scenario. You would need to set up an ApiApp that applies the assignment and returns the new object. In order to access the corresponding outputs of action1 and action2 you can repeat over the range of indices -- that is, assuming you don't know then numbers of entries in advance, let action3 (that consumes the new custom ApiApp) repeat over
    @range(0, length(outputs('action1').repeatItems))

    you can then pass the data as inputs to action3 using

    Hope this helps

    Monday, April 20, 2015 6:03 AM