How to insert a string variable to Data Table

in array Row use
{Variable}

2 Likes

Hi @saandra

You cannot directly assign a String variable to a datatable. If you are having a Add Data Row activity, you should either pass a datarow type variable or a array of strings for example. So, if dealing with variables, the best option is to use the ArrayRow property of the Add Data Row activity. Depending on the number of columns, you should pass the values.

Let’s assume you have three columns in your datatable and you want to use ConcatClientDetailsString for the second column of the datatable. Then in the Add Data Row activity, pass the following command in the ArrayRow property…

{"", ConcatClientDetailsString, ""}

This way you specify values for all three columns as an array… If you have three variables to pass for all three columns, then its like this

{StringVariable1, StringVariable2, StringVariable3} 

If this works for you, please mark the answer as the solution so it will help others as well :slight_smile:

10 Likes

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