Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

flow designer script

chandan2212
Tera Contributor

Hi All,

 

I am getting two or more sysid via flow varible in the flow designer,  I neded to pass one by one sysid in the another subflow flow along with group name , but it takeing only first sysid other sysid is not taking .I have designed using the for each records , can anyone advise me how to achive this requirement.

 

if the  receive  5 sysid is than 5 times subflow should run can anyone advise me how to do it .

 

 

Thanks and Regards,

Chandan Patra

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@chandan2212 

why not pass complete string and then in Subflow iterate?

You can't have flow variable of type Array and hence you can't iterate that

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

Ankur Bawiskar
Tera Patron
Tera Patron

@chandan2212 

another way is

-> pass that string of 5 sysIds to custom flow action as input

-> in that use script step and convert that to array of string

-> then return this output from action to main flow and then iterate that array using For Each

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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