Change all values in a column

Hi everyone.

Is there a way to change the values of an entire column in a datatable, without the need to iterate through the rows of the datable?

I have a datatable with many rows that I must replicate equal to the number of days it has in the past month. The only value that changes is the date.

Taking the month of October as an example, I currently did a do while that iterates 31 times and in turn inside a for each row to only update the date column. The process works but can take a long time.

Anyone know if I can change the date values for the entire datable to only paste the datatable 31 times

Hey @Jose_Daniel_Grimaldo_Garc, check this out:

Hi @Jose_Daniel_Grimaldo_Garc

U can try this in invoke code

dt1.AsEnumerable().ToList().ForEach(Sub(row) row(ColumnName)=value)

By passing dt1 as In/Out argument in invoke code with language type as

Hope it helps you


Nived N :robot:

Happy Automation :relaxed::relaxed:

1 Like

I managed to lower the runtime a lot with this
Thank you so much!

1 Like

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