Hello,
I am having a data table :
ROLLNO NAME
1-----------X
1-----------XY
2-----------A
3-----------B
Now if I use Lookup Data Table on ROLLNO column for value 1 it gives me index 0.
What I want is to get the index of row where ROLLNO=1 and NAME=‘XY’
Any suggestions would be really helpful.
Thanks,
Vaibhav
Hi
Hope we have this datatable ready named dt
—pass this variable dt as input to FOREACH ROW activity and inside that loop use a IF condition like this
row(0).ToString.Equals(“1”) AND row(1).ToStrung.Equals(“XY”)
If true it will go to Then part where we can get the index of that row like this
int_index = dt.Rows.IndexOf(row)
Where int_index is a variable of type int32
Cheers @vaibhav15211
Another out of context question. I have a datarow variable var_Data_Row. Is it possible to assign values directly to this variable. If yes, then how.
Please guide.
Thanks,
Vaibhav
not to a datarow
but to a specific position that (is specific column) in that datarow
like
datarowVariable(columnindex) = “yourvalue”
where columnindex starts from 0 for the first column
or
datarowVariable(“columnname”) = “yourvalue”
Cheers @vaibhav15211