How to update value of previous row of an datatable while running through for each row activity

I have a data table DT1

Col1, Col 2
A , x
, y
B , z
C , m

under for each I want to update the col2 values, such that when the col1 is empty, col2 value of current row will be added to column value of previous row. so the output will be

Col1 Col2
A , xy
, y
B , Z
C , m

Hi @amarjeet.kumar

You can try with Update row item Activity

Refer to the Link:
https://docs.uipath.com/activities/docs/update-row-item

Regards
Gokul

Hey @amarjeet.kumar, you can use the row index of the previous row, if you’re using any Excel as the source to read the data.

Like if your condition matches, then get the value by reading the cell with the Index value Eg. B(Index value) - B2

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