The CreatorCon Call for Content is officially open! Get started here.

Passing List Collector to Subflow in Flow Designer

Ziad Qadora
Kilo Sage

Hello,

 

I have a couple of catalog items where a list of users are selected to be added to a group.  One catalog item is to create the group and add users to it if users were selected.  The other catalog item is allow the user to select a group and modify the user list by adding or removing users.

I would like to create a subflow in flow designer where I pass the group and the list collector of the usere.   How can I pass the list collector of the users to the subflow?  What will the input in the subflow set to for the list collector?

I was thinking to have the subflow get the catalog item variables instead of passing the list, but I'm trying to make this subflow as generic as possible for future user.

 

Regards,

Ziad

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you will have to use Get Catalog Variables action

Then get the variable value and then send it to Subflow as below

refer below links for help

Subflows

Scripting with Flows, Subflows, and Actions

Regards
Ankur

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

View solution in original post

4 REPLIES 4

Geoff_T
Mega Sage

Hello,

In the workflow you will need to add the 'Get Catalog Variables' action to retrieve the List Collector variable value.

Then in your subflow you will create an input to capture the List Collector variable value passed in; a comma separated list of user sys ids.

Once you define the input in the subflow you can pass the List Collector variable pill from the parent flow.

 

Please let me know if this helps.

Were you able to get this work in Quebec?.I could get this work in the main flow  in Quebec but when the list collector value was passed to subflow it was empty.Since it is a comma separated string of sysids I gave the Subflow  input variable type as String.Even tried scripting to convert to string using toString() before passing the value to Subflow.Still did not work.

It did work on SanDiego

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you will have to use Get Catalog Variables action

Then get the variable value and then send it to Subflow as below

refer below links for help

Subflows

Scripting with Flows, Subflows, and Actions

Regards
Ankur

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

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Ziad,

Hope you are doing good.

Let me know if I have answered your question.

If so, please mark appropriate answer as correct & helpful to close the thread.

If not, please let us know if you need some more assistance.

Regards
Ankur

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