Create list of destinataire

I have a Datatable with string that I want to put in a list of string.
This list contains email and i’m looking to use Gsuite application scope to send mail thus I need a system.string

The size of this DT can be different from a run to another.
Thus I want to create a for each row and append to the list row(1) and then use this list to send a email

I have some issue regarding the type of variable to use can you help me ?

1 Like

in variable panel create a list variable named list_input with datataype as System.Collections.Generic.List(of string) with default value as new List(of string)
–so to add values to this list innside the for each activity use a ADD TO COLLECTIONS ACTIVITY where iin the collection property mention as list_input and in the items property mention as item.ToString

Cheers @Pierre_PARIS

You can use this:
Create variable array as String()
arrray = dt.Rows.OfType(Of DataRow)().[Select](Function(k) k(0).ToString()).ToArray()

1 Like

I have this message of error : Add To Collection: The property ‘Collection’ of ‘Add To Collection’ is not initialized.

Can you help me ?

We need to initialise the variable in the variable panel for that list variable
Cheers @Pierre_PARIS

it was not ment for me i think

Cheers @Palaniyappan

1 Like

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