Hi,
Can someone please let me know is there any way to transfer the values from Datastable1 to Datatable2 without using Variable’s.
Thanks in advance.
Hi,
Can someone please let me know is there any way to transfer the values from Datastable1 to Datatable2 without using Variable’s.
Thanks in advance.
@Balaji93
Welcome to the forum
May we ask you to illustrate your case with some sample date.
In general we can do it e.g. by direct assignments within for each loops or using a LINQ
Hi,
Please find the sample below:
Note: Without using Variable’s.
INPUT:
Datatable1:
Header1 Header2 Header3
A B C
AA BB CC
AAA BBB CCC
```Preformatted text
OUTPUT:
Datatable2:
Header1
A
AA
AAA
B
BB
BBB
C
CC
CCC
Thanks in advance.
Try the following:
Build Datatable1
Build Datatable2
The use a For Each Row in Datatable1 and Add Data Row for each column in DataTable1 to DataTable2.
Hope this helps.
give a try on following:
Build datatable - Configure 1 column: Col1 - output variable: dtTransformed
Use an assign activity:
LHS: dtTransformed
RHS:
(From c In dtData.Columns.Cast(Of DataColumn)
Let vl = dtData.AsEnumerable.Select(Function (x) x(c.ColumnName)).toArray
From v In vl
Select r=dtTransformed.Rows.Add({v})).CopyToDataTable
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.