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.

List collector to array via flow designer

tGhadage
Tera Contributor

Screenshot (312).png

 

here I am trying to automate the user assignment role using flow designer so 

here first got the catalog variables 

then here I am trying to convert list collector to array as we will be getting the more than one roles to assign to the user.

 

 

here I can not get the variables in trying to convert the list collector to array.

 

can you please help

2 REPLIES 2

OlaN
Tera Sage
Tera Sage

Hi,

If I understand what you're trying to do here, then there is no need to convert an list collector variable (input variable from the RITM) to an array.

You can do a lookup records action, and select that the sysID should be one of <your data input from variable here>

 

Example below

flow-designer-look-up-records-from-list-collector.png

Amit Verma
Kilo Patron
Kilo Patron

Hi @tGhadage  

 

List Collector elements are separated by ',' so you can make use of scripting and split the list collector variable on ',' to get an array. Refer 

https://www.servicenow.com/community/developer-blog/using-list-collector-in-flow-designer-for-each-l...

https://www.servicenow.com/community/itsm-forum/split-a-list-collector-variable-to-an-array/td-p/784...

 

Thanks and Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.