How to copy values from list collector variable to string field using flow designer

Divya57
Tera Expert

Hi Guys,
Am facing an issue with copying values from list collector variable to string field in a custom table.
I have a list collector variable referring to user table in one of the catalog item. end user can select more than one user in it. After submitting the catalog item based on approvals these multiple users from list collector variable will need to added to string field of a custom table.
In the flow designer i used getvariables and then used inputs in update record. When it is only one record its getting copied but then its multiple records, its not getting copied in the string field.
Please suggest

1 ACCEPTED SOLUTION

Okay, here you go, a simple example on how you can set the data within the Flow.

First an overview on how it's done, then I've provided some details on the steps in the flow for explanation.

 

flow-set-data-from-list-collector-overview.png

 

flow-set-data-from-list-collector-overview-step2-expanded.png

 

flow-set-data-from-list-collector-overview-step5-expanded.png

 

flow-set-data-from-list-collector-overview-step7-expanded.png

 

View solution in original post

12 REPLIES 12

Okay, here you go, a simple example on how you can set the data within the Flow.

First an overview on how it's done, then I've provided some details on the steps in the flow for explanation.

 

flow-set-data-from-list-collector-overview.png

 

flow-set-data-from-list-collector-overview-step2-expanded.png

 

flow-set-data-from-list-collector-overview-step5-expanded.png

 

flow-set-data-from-list-collector-overview-step7-expanded.png

 

This is working fine except its add ‘ , ‘ at starting of a word.

example:- ,ramesh,suresh,mahesh

how to remove the only first ‘ , ‘ ??

Be sure to have the loop run in different branches on the first iteration (when the Flow variable is empty). Then you set the data directly (step 5 expanded).
In all the other cases (the else-statement) the loop runs to append data (as shown in step 7 expanded)

Perfect.

thank you so much. Its working like charm. 
thankyou for your efforts 

SP22
Mega Sage
Mega Sage

Hi @Divya57 

Can you please find the below link and let me know whether it is useful or not.

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

Thanks
SP