How to add items to a list?

Earlier UiPath Studio had activity called Add to Collection, using that we could add items to a list. In current version of UiPath “Add to Collection” activity does not exist. Not sure if we can use “Append Item to Collection” activity since there is no detailed description and examples in UiPath Documentation. Can anyone please suggest what current procedure is to create a dynamic array or add items to list dynamically? Thanks in advance! :slightly_smiling_face:

Hi,

In UiPath.System.Activities 22.10.3, we can use AppendItemToList activity, as the following.
It’s easy to use like AddToCollection if target type is List<T>.

If you need to handle Collection<T> , AppendItemToCollection will work.
Please note that if we want to update the input list, it’s necessary to set it at Output-Result property, too, as the following.

Regards,

3 Likes

Hello @Arijit_Sarkar

Please cehck theb elow video.

Thank you! Actually, Append Item to list worked for me to add items to the list dynamically.

Appreciate your detail description. It was helpful. You are awesome :slight_smile:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.