How to replace empty value with respective of upper row value in datatable

Hi forum,
I have a datatable as:


As you can see in the above image some fields are empty and I wanted to fill the value with its upper row value as:

Can anyone tell how to do this.

Thanks in advance

Hi @Nisha_K21 you want to update values right?

@Nisha_K21,

Follow this thread,

@ashokkarale The above thread didn’t help me
Is there any other approach for this?

Hi @Nisha_K21

Refer the below video

https://youtu.be/pDflFXpxWFE?si=SA7g5R6Oci9tDyFS

Regards,
Gowtham K

Hi @Nisha_K21
Use this code in invoke code activity:
datatable as dtInput

For i As Integer = 1 To dtInput.Rows.Count - 1
    For j As Integer = 0 To dtInput.Columns.Count - 1
        If String.IsNullOrEmpty(dtInput.Rows(i)(j).ToString()) Then
            dtInput.Rows(i)(j) = dtInput.Rows(i - 1)(j)
        End If
    Next
Next
1 Like

This method worked.
Thanks @Manisha_Ravindra

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