How to create dynamic data table?

Create Dynamic DataTable from given string with using activty like add data column and add data row Input String1 – a-1-m, b-2-n, c-3-o Input String2 – a-1-m-t, b-2-n-s, c-3-o-q Input String3 – a-1-m-f-g, b-2-n-v-b, c-3-o-b-n, v-d-s-f-a?


Can you clarify column name, data type and data which should be stored?
It’s better to share expected output as the following image.




You can try using generate datatable activity…in which you can give column separator as comma and procide the column names string separated by comma and select headers present.then output will be datatable with required column names


Hi @aparna30 ,

If the Inputs are in three different variables, then first we would need to concatenate/combine them into a Single String.
Assuming strInput1, strInput2 and strInput3 are the input string variables, for Combining we can use the below expression :

combinedString = strInput1+", "+strInput2+", "+strInput3

combinedString is a variable of type String. Notice that while combining, I have used ", " (Comma and a Space), as it was the pattern followed within the input string as well.

Next, we configure the Generate Datatable Activity like shown below :

The Output is shown in the below image.

Output :

Let us know if this doesn’t work for all of your cases and explain more about the failed cases.

1 Like

Please Refer The Below xaml.

Dynamic Data Table.xaml (21.5 KB)
Note-(Without using Generate DataTable Activity)

Note- Here I have Taken 3 inputs as
1.input_1 : a-1-m, b-2-n, c-3-o
2.input_2 : a-1-m-t, b-2-n-s, c-3-o-q
3.input_3 : a-1-m-f-g, b-2-n-v-b, c-3-o-b-n, v-d-s-f-a

In input_given variable just pass one of the input value or any other input you have.
And in first for each loop just pass that input variable.

For eg : if you are taking input_3, Put the value of input_3 in the input_given variable and then in first for each pass the input_3 varible.


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