Add string array into data table column

I have an array of string and I want to add this array in data table column. I saw this link but couldn’t solve my issue. I also followed this link but Now I’m seeing System.String as value.
Following is my flow

This is my Datatable

This is what I’m giving in Add Data Row

And this is my result

Kindly guide me on this. Really appreciate your help :slight_smile:


Kindly change the type of column to string from string[ ] in BUILD DATATABLE activity and try once

Cheers @Maryum

@Palaniyappan Data type is already string

1 Like

thats what buddy change that to STRING

1 Like

@Palaniyappan I’ve changed the type as below 6
but still getting this output

1 Like

@Palaniyappan I Can’t understand what’s the issue.

1 Like

what is the type of imagelist variable
is it a string array if so then mention as imagelist directly and not like within curly braces {imagelist}

and how many element does it have
if it has only one element then its fine because we got only one column in our datatable
and if its more than one value in that array variable, then we need the same equal number of columns in that datatable

this is the reason for its failure
kindly check this and let know for any queries or clarification
Cheers @Maryum

@Palaniyappan imageList is of type Sting and I don’t want more columns. I just want to add array values into one column only like this

Is there any way to do that?

1 Like

@Palaniyappan Array has image paths which i want to add in a column

so in that the sequence be like this
–use BUILD DATATABLE activty and build the datatable with that single column structure and get the output with a variable of type datatable named dt
–LETS SAY LIKE WE HAVE THE array variable ready named imageList
–now use a FOR EACH activity and pass the variable imageList as input and change the type argument as string in the property panel of for each loop
–inside the loop use ADD DATAROW activity and mention the array row as {item.tostring}** and in the datatable mention as dt**
–now outside the FOR EACH activity that is next to it use OUTPUT DATATABLE activity and mention the input as dt and get the output with variable of type string named str_output
–then use writeline activity and mention the input as str_input.ToString

Cheers @Maryum


Kindly let know for any queries or clarification
Cheers @Maryum