Append DT Column to Existing DT


I am working with a flow that has a main data table that I want to continually append data to. I am currently building a data table with a single column, then attempting to append that data on to the main data table.

When I use the Merge Data Table activity, it appends the new column under the existing column rather than as a new column next to the existing ones (I ultimately want to export to csv). How do I get it to add as a new column next to the existing ones?

Unfortunately, I cannot upload workflows as this would violate company security policies.

Thanks in advance.

1 Like

we can use ADD DATA COLUMN activity here

Cheers @Tal294

I figured, but this requires the input data to be in the DataColumn format and it is currently in the DataTable format. Is there a way to accomplish this without rewriting my code?

1 Like

no worries in datacolumn property of add data column we can mention the column we want to add from the datatable
like this

so we dont need to change the current structure
Cheers @Tal294

One more thing, I am now getting the following error:

"Add data column: Column ‘XXX’ already belongs to another data table.

does that column has same name as already existing one
if so in the build datatable kindly change the name and try once
because we wont be able to create two columns with same name
Cheers @Tal294

Is there a way to change the column name each time the activity runs? The Build Data Table runs multiple times and gets appended after each run

1 Like

no worries
weren’t we able to change in build datatable activity
if not
yourdatatablename.Columns(0).ColumnName = “yournewcolumnname”
would work with simple assign activity

Cheers @Tal294

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