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

Samyak Jain2
Tera Guru

Hi can you tell me which type of variable you have taken for input variable & output variable

chaffou
Tera Expert

Hi

Variable Inputs should be a string and you pass a list to that sting?

Variable Outputs should be Array.string?

Thank you!

Hi @Sebastian R. and chaffou, to clarify the inputs and outputs for the List to Array action?

Action input  - String

Script step input - not defined  (drop pill from input Variables)

Script step output - Array.String

Action output  - Array.String  (define and drop pill from script step output)

 

Please see images of outputs.  Any "input" to what I am doing wrong would be great 

Thanks, Ken

Ravindra H V
Tera Contributor

Hi @Samyak Jain2,
Instead of using a List Collector, you could try using an MRV (Multi-Row Variable) set. It will be easier to create multiple tasks based on location.

 

RavindraHV_1-1739695630304.png

 

RavindraHV_0-1739695620861.png

Please mark it as helpful if you found this useful.