Add data column activity, how to set default value with other column value?

Hi All
How to set the default value for new column with other exists column value ?
col1 col2
Alex 1
Bob 2
Cherry 3
make a new column ‘col3’ with col1’s value.
just write some expression in ‘DefaultValue’ field, not use ‘for each row’ activity for assign.


I tried to use default value option to assign value of col1.But,I couldn’t achieve that.I have written an workflow with copy range activity with in excel application scope to copy col1 to col3.Main.xaml (10.7 KB) .I have uploaded my workflow here.

1 Like

Hi @dywan219
welcome to forum

You can try like to add values to the col3

After adding col3 column , you can use the following query in invoke code with datatable argument dt1 as In/out

dt1.AsEnumerable().ToList().ForEach(Sub(row) row(“col3”)= row(“col1”).ToString)

Hope it helps you

Mark it as solution if it works


Nived N

Happy Automation


hi Nived N

It works, thank you very much!

1 Like

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