How to get previous row value and compare it to the current row

Hi all.
I am trying to get the previous row and compare it to the current row .
And if check if the vale is matching.

For example check if A4 is matching with A3 .
and get A3 value if loop is in A4.

image

@dinesh.s1

Use for each row in datatable activity and then use condition as below…varindex is to be created and assigned to index in for loop

cheers

1 Like

Hi @dinesh.s1

Another approach:

→ Casting the column data into an array, so that the accessibility will be easier:

image

→ The iterating through the array elements & accessing current & previous data:

image

image

Output:

image

Hope this helps,
Best Regards.

1 Like

@dinesh.s1

Check below for your reference

Hope this may help you

Thanks,
Srini

1 Like

Hi @dinesh.s1 - Please check the below workflow

SampleWorkflow.zip (11.4 KB)

1 Like

Is it possible to get JavaScript logic for the same?

@dinesh.s1

Can you please breif what you mean

Cheers

I am trying to replicate the same logic in SAP i-RPA.
So I need the logic in custom script.

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