Creating a List Reference variable in Flow Designer, but cannot For Each loop it.

AD TRANS
Kilo Contributor

Since there are no List type for Flow Variables, I decided to workaround by creating a Subflow. Inside that, I create a string of with format like sys_id1,sys_id2,sys_id3 and push it to an output variable, which is declared as a List<of ABC table records> type variable. Then, I call the subflow from my main flow. When I check the execution details, the subflow was called successfully, and I can even view the records of the output variable.

However, when I want to put that output variable into a For Each action, the For Each can not detect any items in the variable. It says "0 of 0", with the Runtime Value of the Items in the Configuration Details being "View Runtime Value". I don't know at which step did I do wrong. Can somebody help?

find_real_file.png

1 ACCEPTED SOLUTION

Maik Skoddow
Tera Patron
Tera Patron

Hi @AD TRANS 

unfortunately there is no simple concept of handling and looping through list collector values.

An approach is given at https://community.servicenow.com/community?id=community_blog&sys_id=e244e902dbcc2010fb4ae15b8a9619c3

Kind regards
Maik

View solution in original post

2 REPLIES 2

Maik Skoddow
Tera Patron
Tera Patron

Hi @AD TRANS 

unfortunately there is no simple concept of handling and looping through list collector values.

An approach is given at https://community.servicenow.com/community?id=community_blog&sys_id=e244e902dbcc2010fb4ae15b8a9619c3

Kind regards
Maik

Community Alums
Not applicable

Just checking to see if I can reply...