Hi,
I have stored in a change node my msg.payload to flow.xxx.
Now I would like to set msg.payload.content with a String - say "This is my string: " followed by the content of flow.xxx
I have tried a JSONata element saying "This is my string: " & flow.get("xxx")
but it does not work.
Is there any other option anyone can show me!
Thanks
Kallewirsch
ghayne
2 February 2020 10:02
2
Have a look at $flowContext(xxx) instead of flow.get("xxx"). flow.get("xxx") is JavaScript, which won't work in JSONata.
ghayne:
$flowContext(xxx)
Hi ghayne,
thanks for clarification.
It showed the flow element is an array and my value is stored in the first element of the array (I guess 0).
Could you do me the favour to give me your help again and show me the syntax of the command accessing the array-element of my flow variable.
Thanks in advance.
Hi ghayne,
found it myself.
$flowContext(xxx)[0] - works
Thanks
an alternative is to use a template node, where you could just use
"This is my string: {{flow.xxx}}"
1 Like
system
Closed
2 April 2020 11:51
6
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.