Pass object to sub-flow

perosterber
Tera Contributor

Hello,

 

I have a script action which parses MRVS objects and return a html table string. This works when needed for flows. 

I wanted to use this also in a email script, so I created a sub-flow which will call the flow script action. (as I cannot call the flow script action directly from a script to my knowledge )

 

The problem is that the sub-flow seem not be able to receive the current.variables.<MRVS>. If I gs.log(current.variables.<MRVS>) it will print the information. But if I look in the flow context of the receiving sub-flow the values are null. What am I missing?

4 REPLIES 4

Tanushree Maiti
Tera Sage

Hi @perosterber 

 

Subflows don’t automatically inherit current or its variables, especially MRVS (Multi-Row Variable Sets). variables must be explicitly passed as inputs to a subflow.

 

Follow the steps as given in this post : How to access variable set variables in flow designer .

 

 

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

Hi,

 

Yes ofc. Thats why I am trying to pass them but nothing is received, please see attached screenshots.

Ankur Bawiskar
Tera Patron

@perosterber 

you have a flow action or script action?

share that screenshot

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Sorry - flow action.
I have a functioning flow action which takes an array.object and returns a string. I want to be able to use this even outside a flow, so I have created a sub-flow which I am trying to call based on the code snippet. I am trying to call it from a email script and I am trying to pass a variable set from a RITM, this variable set I can log using gs.log and it shows expected data, but the sub-flow is getting no in-data (see attached pics). I dont understand why nothing is passed.