Flow Designer

Samyak Jain2
Tera Guru

Hi,

I am new in flow designer i have one requirment  created the maintain item that containing a variable location, of type list collector .if user selected the three location ,so three catalog task should be created if four so four task should be created means dynamic flow . so please help me.how it can be possible in flow designer.

1 ACCEPTED SOLUTION

Sebastian R_
Kilo Sage

First screenshot is from the custom Flow Action you have to build (takes a string and returns an array).

 

2. Call your custom action "String to Array" with the location variable as string input (unfortunately it didn´t rename it in my flow)

3. Do a for-each on the result from the action (array of sys_ids)

3.1 Do a GlideRecord Lookup for the Location based on the for-each value (sys_id)

3.2 Create the Catalog Task as you want.

 

If you are not familiar with Flows and Actions, please have a look at the documentation: https://docs.servicenow.com/bundle/orlando-servicenow-platform/page/administer/flow-designer/concept...

View solution in original post

13 REPLIES 13

Sebastian R_
Kilo Sage

Unfortunately you cannot do a for-each on a list collector. I even tried to use a transform function to use it as array, but it seem to have a bug and is not working correctly.

Looks like you need to write a Flow Action which takes the List Collector as String and returns an String-Array. Then you can loop over the array, look up the location record and create the catalog task.

Hope my example helps you.

find_real_file.png

find_real_file.png

Samyak Jain2
Tera Guru

I didnt understand can you give me your contact number.

Samyak Jain2
Tera Guru

Can you please explain me in detail?

 

Samyak Jain2
Tera Guru

I didn't understand 2,3,3.1 activity can you tell me from where you have taken because i m selected flow not action i m not getting the script activity.