Adding Leading Zeros to column in Data Table

I need to add leading zeros to columns in a data table. I think I found the correct logic to add the zeros But i dont know how to get the current row out of the Data table, update with leading zeros, then place back in. I think i need to get it out and convert to a string. I think im just missing one piece of the puzzle.

Below is the Data Table

Below is the logic im using
image

Error
image

You have to use Current row(“Counter”)

Current row.column(“Counter”) will not come

Thank you!

I also add to throw in a .ToString but what you suggested did the job. I appreciate it

Solution
CurrentRow(“Counter”).ToString.padleft(8,CChar(“0”))

Hi @Waterfowl_Waterfowl_hunte

Are you using this expression inside the For each row in datatable activity, If yes then modify a small bit in your expression,

CurrentRow("Counter").pdfleft(8,CChar("0"))

Hope it helps!!

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