How to get the values of a data column to a string

The Classical Way:
Iterate with for each row and add first column to a collection of type List(Of String)

The one liner
define a variable: eg. name: StringListVariable type: List(Of String)
Use an assign activity
To: sl,
Value: YourDataTableVariable.AsEnumerable.Select(Function (row) row.Field(Of String)(“YourColName”)).toList

Later you can easy bring the string list to flatten string eg. String.Join(“,”,StringListVariable.ToArray)

For the one liner way make sure System.Data.DataSetExtensions is imported
Have a look here:

5 Likes