Add Column and assign value from another column

Hi Everyone.

I have table has Column as below:


I want to add another column into this datatable and get value is the last 4 number from another column

Card Num
6473XXXX1224 1224
6351XXXX3333 3333
7163XXXX4321 4321

How to do that?

Thanks in advance!

Hello Mr.H,

Test.xaml (8.4 KB)

Kindly refer attached test workflow for your reference.
Hope this will help, you can use other options also…


Hi @Mr.H

You can try this way too

Main.xaml (7.9 KB)

Hope it helps you


Nived N

Happy Automation

1 Like

Hi Bro @NIVED_NAMBIAR & @NehaGore

Thanks you so much both of you.

I have another question for this case.

I want to add another column name “Number” and then add auto-increment start from “1”… example as below :

Number Card Num
1 6473XXXX1224 1224
2 6351XXXX3333 3333
3 7163XXXX4321 4321

How to do this ?

Thanks in advance!

Hi u can do in same Workflow I send with little modifications I send

Like in build datatable add column Number

Then assign a variable index = 1

Inside the for each row , in add datatrow activitiy in array row, add the index as element

{index, .,.etc}

now after the add datarow activitiy increment the index by one


Try this way


Nived N :robot:

Happy Automation :relaxed::relaxed::relaxed:

1 Like

Hi Bro.

Thanks you.

But i dont want to use For Each Row … i have used For Each Row and successfull before, but i’m find another solution without using For Each Row activity. Example LinQ.