Error of "Add To Collection: The property 'Collection' of 'Add To Collection' is not initialized"


I keep receiving the error “Add To Collection: The property ‘Collection’ of ‘Add To Collection’ is not initialized.” when I try to use the " add to collection" activity. I am trying to use a List of dictionaries and the dictionaries {key,value} is {string, datatable}. I am trying to add a dictionary to a list in the “add to collection” activity. I think I am getting this error because I have not initialized the list correctly and if that is the case how would I initialize a list of dictionaries thats {key,value} is {string,datatable} ?

Thank you in advance for your help!

new List(Of Dictionary(Of String, DataTable)) - for the List
new Dictionary(Of String, DataTable) - for the dictionary

As you are using a key within the dictionary kindly note following:
for not losing the identity within the list of datatable we can also use the DataTable Poperty TableName.

yourDatatableVar.TableName = “SameAsYouUsedForTheKey”

1 Like

Thank you so much for the help!

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