i use a logic app to define a variable named "symbol". Now i want to use the value of the variable in a later part of my logic app but the dynamic contents doesn't show my variable. How must the code look like so that I can use the variable in the inlinecode?
2 Answers
According to the documentation, "this capability doesn't support variables, loops, and iteration indexes".
Sometimes, Compose actions can be used instead of variables. The output of a Compose action can be used in inline code.
Comments
You can use values of variables in the inline Javascript action. When you have a 'set variable' action called "Set_variable_MyValue", then you can reference it in the inline script action like this:
var myValue = workflowContext.actions.Set_variable_MyValue.inputs.value
In case you have an array as variable value, you can use this to get the value of the first element in the array:
var myValue = workflowContext.actions.Set_variable_MyValue.inputs.variables[0].value