Add collection to datatable

Hello friends,
@rkelchuri, @Ninett_Panfir, @Rammohan91, @balupad14, @Florent_Salendres, @vvaidya, @Palaniyappan, @ClaytonM, @vvaidya, @lakshman, @Dave,

how is it possible to add a collection to an already existing datatable?
Can you please share a xaml?
Thank you for your precious support,
Cami :slight_smile:

1 Like

@CamiCat

What do you mean by adding collection to DataTable, what kind of Colletion it is, are you want append those collection or fill all data to a single row or cell ?

Hello @rado,

I would like to append the collection to the rows of the already existing datatable.
How is it possible to do it?
Cami

Does structure of the collection’s row is the same as in the existing DT ?

Fine
before adding to the existing datatable with that collection element we need to make sure that the number of elements in the collection is equal to the datatable column count
–unless they are same we wont be able to add them
–then if we want to add a collection to the datatable we can use ADD DATAROW activity
where in the datatable property mention the datatable name and in the Arrayrow property mention the collection
–if the collection is list then mention like this yourlistvariable.ToArray()
or
if its a array then mention directly the array variable yourarrayvariable in the ArrayRow property of add data row activity property panel

hope this would help you
Cheers @CamiCat

3 Likes