How to find index of a row based on condition

Can any one help me how to find the index of a perticular row from datatable based on some condition

Hi
Let’s take like we are inside the FOR EACH ROW
And with IF activity any condition gets satisfied it goes to THEN part where we can use a ASSIGN activity like this

int_rowindex = dt.Rows.IndexOf(row)

Where row is the variable from FOR EACH ROW activity and dt is the datatable that we obtain from read range

Cheers @Abhishek14

1 Like

how eactly should i mnetion the condition where depending on a column value… likein one of my Employemet type has values such as permanant and temperory…i want employee type =permanant

Fine
Inside the for each row loop use a if condition like this
row(“yourcolumnname”).ToString.Contains(“Permanent”)

If true it will go to THEN part where we can use the above expression

Cheers @Abhishek14

3 Likes

Thank you very much, it worked for me…cheers!

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