Hi. I have a problem. - I have made a subflow with one input-port called Entitet. How do i use that value in code, where i build a payload?
I have tryed this: msg.payload.data.entity_id = "{Entitet}"; - But that actualy just returns a string contaning {Entitet} ... So, there must be another way!
Can you explain a bit more what you mean about having an input-port called Entitet?
Subflows don't have named inputs in that way. The messages are passed into the subflow just as they would be passed into any other node.
So if you pass a subflow a message with msg.payload = "foo", then in a Function node within that Subflow, you'd use msg.payload just as you would outside of the subflow.
I can try. I have attached an image, showing the input-port on the sub-flow i'm talking about. Hope it makes sence... - Renamed it to ENT ... Just to write something shorter.