Add Data Column show error as already belong to another datatable

I want to add the data column from one datatable to another as below:
And it show me an error message :
Add Data Column: Column ‘xxx’ already belongs to another DataTable.

why column belongs to another DataTable can’t be add to specific datatable1?
Please help me, thanks

Input:
column : datatable3.columns(0)
Datatable: datatable1
image

@j1070148 Can you tell us what do you actually want to do ?

You cannot directly add the columns using the Data Column of another datatable in the Column Property. Since the Datatable has it’s reference to it’s data columns, it would give out the error.

However you could use the Column Name Property of the Datatable and add the same name to another datatable using DT.Columns(0).ColumnName

I want to add a column in a datatable from another existing datatable column.
ex. datatable1.column(0) to be added to datatable2 as a new created column.
There shows an error when using add data column

As mentioned by @supermanPunch
a datacolumn from one datatable cannot be used for an direct addition to another datatable.
And this is the reason why the error is shown.

As an alternate you can do (Create Datacol, and transfer settings from other datacolumn)
Variables
grafik

Flow:
grafik
grafik

it also depends on your scenario details. We get also compact flows we clone datatable and a further datacolumn structre modification

3 Likes

Many Thanks, Problem solved

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