How to initialize a collection variable



I’m trying to add an item to a collection type ICollection, but when I do it I get this error:

“The property ‘Collection’ of ‘Add to collection’ is not initialized”

How can I initialize a collection then?


You need to first initialize list using assign activity then pass the item to the add collection.
items=new List(of string)
Please refer.


hi @ddpadil

Add to collection is replacing objects instead of adding them one by one.

So can i do this- I am using Assign activity

sel1= new list(ofString,list(ofString))

Is this the correct format?



Please don’t create duplicate post.
Refer Below