Hi Guys!!
I used generate data table activity to create datatable from a text file content. The output was created into two columns but I need it in a single column like below. How can I achieve this
Thanks in Advance!!
Hi Guys!!
I used generate data table activity to create datatable from a text file content. The output was created into two columns but I need it in a single column like below. How can I achieve this
Thanks in Advance!!
You can use this query in the Invoke Code activity:
io_dt.AsEnumerable.ToList.ForEach(Sub(row)
row(2) = row(0).ToString+row(1).ToString
End Sub)
Invoke Code Edit Arguments panel will be:
Hope this helps,
Best Regards.
@arjunshenoy Thanks brother.
I have an other doubt. Is it possible to have the columns in a dynamic way like sometimes instead of A,B columns alone, C & D columns may also appear. So by the time I need to merge A,B,C,D columns into single column. So is it possible to have the merging method in dynamic way?
In that case, yourDt.Columns.Count
will give you the total number of columns present in your data table. Then you can use a For Each Row in Datatable
activity to iterate through each row of the data table & start combining all column data into the last column.
On each row, you can again iterate through the columns & start combining them in a variable called combinedColumnData
. You can design the workflow something like this:
Regardless of the number of columns changing, the output combine all column data:
Hope this helps,
Best Regards.
It sounds like maybe we should address why the generate data table activity isnβt resulting in what you want. Show us the source data and how you have the generate data table activity configured.
i guess this should be in simple way
while generate datatable their should be some delimiter to separate data between columns like , or space or any special character
So simply you can replace the delimiter with ββ
The final result will be in single column without any further modifications
Regards
Thanks @LAKSHMI_NARAYANA_PEMMASAN
Working as expected.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.