how to extract a list of indexes? ExtractDataTable.Rows.IndexOf( ExtractDataTable.Select(“[Column-4]='”+row(“Data_richiesta”).ToString+“’ AND [Column-6]='”+row(“Data_scadenza”).ToString+"’ ")(0))
Not only the first one.
Thank you,
Cami
Hi cami
–hope these steps would help you resolve this
–use a excel application scope and pass the file path as input
–inside the scope use a Read range activity and get the output with a variable of type datatable named dt
–now use a for each row loop and pass the above variable as input
–inside the loop use a if condition like this row(“yourcolumnname1”).ToString.Equals(“yourvalue”) AND row(“yourcolumnname2”).ToString.Equals(“yourvalue”)
if this true it will go to THEN part where we can use a ADD TO COLLECTIONS activity
–in that activity property panel mention the variable list_rowindex of type System.Collections.Generic.list(of integer) with default value as New List(of integer) defined in the variable, to the property collections and in the items mention this dt.Rows.IndexOf(row)
and change the type argument as int32
–so the variable list_rowindex know will be having the rowindex of matching condition - rows
Kindly try this and let know for any queries or clarification
Cheers @CamiCat
ListIndexes= (From p In dta.Select
Where(From q In dtb.Select
Where Convert.ToString(q("Data_richiesta")).Equals(Convert.ToString(p("Column-4"))) and Convert.ToString(q("Data_scadenza")).Equals(Convert.ToString(p("Column-6")))
Select q).Count>0
Select Convert.ToString(dta.Rows.IndexOf( p))).ToList