I am trying to update an entire column in a datatable with the same value.
Anyone can help me with that?
At the moment, I am running a ‘for each row’ for the datatable and single-updating each row with same value - which I don’t think is the best option.
Ideally, I didn’t want to pass index “0” in the code above.
Link for reference: Update Column in a specific row
If it’s a table that already has values, then you have to loop. How large is the table? It should take a couple seconds max to loop through each row…
Can you change the way you’re getting the table to UiPath? You could cast or set the data manually for that column when you import it
You have another way . But it is not recommended.Add new column as “Status” with default value.
Unfortunately I can’t. In fact, I am reading a .xlsx file, reading it into a datatable (dt1), then I navigate through a webpage, “data scrap” a different table turning it into another datatable (dt2).
Afterwards, I join both tables and set “ok” for all rows. Then, I left join the tables and set “error 1” for all rows and finally I right join the tables and set “error 2” for all rows.
But since you said it shouldn’t take long I’ll keep the for each row then.
It wouldn’t solve my problem