0
votes

I am trying to access an action output in Logic App inline Javascript action as follows: enter image description here

However, this leads to an error while saving the workflow -

Failed to save logic app <>. The template validation failed: 'The action(s) '@outputs('Get_current_loop_object')' referenced by 'inputs' in action 'Wrap_Work_Relationship_data_to_array_if_needed' are not defined in the template.'.

Any ideas what I may be missing?

1
seems I have run into this limitation described here: docs.microsoft.com/en-us/azure/logic-apps/… "This capability doesn't support variables, loops, and iteration indexes."; which should be rephrased as - "...,actions within loops,..." - Arindam Paul Roy

1 Answers

1
votes

As per my repro It works for me by using following steps with inline java script :

Click on the Workflow settings menu bar.

enter image description here

After that select integration account which you created:-

enter image description here

Add files in get content:

enter image description here

Then Initialize the variable name with object type which is needed.(variable "json" should have to be initialized & declared before using it in the java script) enter image description here

Coming to Action item part you need to mention the function or the operation as action item that you have mentioned in the below javascript connector in the logic app.

enter image description here

Saved it successfully:

enter image description here

NOTE:- It is not supported with loop as mentioned in this document

For further details refer this link .