Hello,
is it possible to use context, inside a subflow?
Inside my subflow I try to set flow context as shon in the picture with change node using set.
But when I refresh context tab, nothing apears there. Am I doing something wrong?
Hello,
is it possible to use context, inside a subflow?
Inside my subflow I try to set flow context as shon in the picture with change node using set.
But when I refresh context tab, nothing apears there. Am I doing something wrong?
The context sidebar does not show context from inside a subflow.
When you have the subflow open in the editor, you are looking at the template for the subflow. You might have 10 instances of the subflow in your flows, and each has its own flow
context.
So the context sidebar doesn't know which subflow you want to see the context of.
Nick,
Sorry if i am not understanding here - properly.
Can a subflow push back flow variables into the flow that it was called from - or only use the global variables to achieve this ?
Craig
Inside a subflow, flow
context is scoped to inside that instance of the subflow.
You can get to the parent flow's context by starting your context key with $parent.
For example, if a flow has a flow context property called flow.color
, then from inside a subflow on that flow, you can reach it with flow.$parent.color
.
Aaah OK thanks - so you can push back values the same way by using flow.$parent.color and going a set or using a change node ?
Craig
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.