Appending 2 datacolumn values in 1

Hi Everyone,
I am storing data into datatable in three different columns namely confirmation numer,amount and name on card but the requirement is confirmationnumber and amount values to be in same columns.

Please find attached excel.CreditcardPayments.xlsx (8.3 KB)

so you want to combine the column values of confirmation number and amount?

I.e. confirmation number = 2639485

New column will be =


What will the new column name be?

You can use For Each Row - Assign Datatable.Rows(currentindex).Item(Confirmation) = row.item(“Confirmation”) + vbcrlf + row.item(“Amount”)

NewcolumnName will be Confirmation&accountNumber

currentIndex is an int variable?

Hi @somya177

Use read range activity

Use build datatable activity

Add data row array row {row(0). ToString+row(1). ToString

Inside the for each use an assign

dtTest.Rows(dtTest.Rows.IndexOf(row)).Item(3) = row.Item(0).ToString + vbcrlf + row.Item(1).ToString

dtTest.Rows.IndexOf(row)) will give you the current row index

Hi Tim,

I tried your solution but it threw an error.Can you please check my flow and rectify?
also please find attached excel containing the dataCreditcardPayments.xlsx (8.3 KB) testFlow.xaml (9.8 KB)

Your issue is you are trying to add data to a column that doesnt exist.

You need to add the new column first before assigning using add data column with your name

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