Convert string list to convert to Array list (Get Catalog in Flow Designer)

Anish Reghu
Kilo Sage
Kilo Sage

Dear all,

There is a HI reference which mentions that The Get Catalog Variables action returns a list collector as a comma separated string rather than an array.

And the resolution suggested is to - Create a custom action that uses a string as the input, parse the string into an array, then outputs the array to be used in the For Loop. 

Can someone suggest how do I achieve this?

What goes into Input Variable? How to use that in a script? How to return the processed values into the Output variable?

I am creating the Flow Designer custom action for the first time and I am not an expert in scripting.

Regards,

Anish

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

refer below links for help

Flow Designer

Flow Designer Foreach loop on Service Catalog List Collector variable type not identified as record ...

Regards
Ankur

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

View solution in original post

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

refer below links for help

Flow Designer

Flow Designer Foreach loop on Service Catalog List Collector variable type not identified as record ...

Regards
Ankur

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

Attempted this, but I am not able to use step 2 in the for loop (the Group record) as she has called it in the solution.

The Group record is greyed out for selection in the For loop.

find_real_file.png

 

And here is my step 1 and 2: (Request group membership is the catalog item)

 

find_real_file.png

Goodness, noticed it just while taking the screenshot, Look up Record, the culprit - should be Look up Records instead. Thanks for referring to the thread Ankur.

@Anish Reghu 

Nice to hear

Happy learning

Regards
Ankur

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