How To Know Next Row is available or not in if condition

How To Know Next Row is available or not in if condition
I have Data Grid ,I Data Scrap the table.
I’m using For Each Row to get row one by one ( row count are changing every time ).
in If Condition If no more row means . I need Close the window.
If next row available means . I need to Continue the process .

Hi @Sayed_Tabrez1 ,

You can use an index variable in the properties of the for each activity and then compare it with the data table rows count to achieve this.

Regards,

1 Like

I think for each row activity itself will iterate only till the last record and comes out of the loop
So if any Ui activity places inside that loop it will repeat only till the number of records available in that datatable

@Sayed_Tabrez1

In between of For Each Row i need put this decision.

Fine then include a condition like this with if activity

(dt.Rows.Indexof(CurrentRow)+1).Equals(dt.Rows.Count)

If true it goes to then block which means that is the last iteration
If not it goes to else to continue with next iteration

Cheers @Sayed_Tabrez1

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