I have a For Each Row Activity and need to compare 2 rows in the same column, to see if they are the same.
My datatable:
Project User
123 ABC
345 ABC
678 DEF
912 GHI
So if it is the same user, I want to avoid logging off and logging in again. So if row(1) = row(1)+1 → continue with next row. If false, log off, log in again and then continue with next row.
I am trying to use the “Assign activity” to create row(1)+1 but my syntax is wrong.
In a For Each row, the row is incremented to the next row through the loop, so row+1 is not needed, unless you use another type of Loop.
To use the For Each method, you will want to store the last value into a variable so you can check if the next value equals the last value. You can do something like this:
ForEach row In dt - If row(1).ToString.Trim <> tempstring — Login Sequence - Process Sequence - Assign tempstring = row(1).ToString.Trim
So basically you can store the value to a variable at the end of the loop so when it goes to the next item you can compare that value with the last value.
It might also be helpful to know about vb.net logic like @Mr_JDavey recommended. Depending on the amount of data you need to process, this is useful for filtering the data you want to process.
ineed read data from schedule data and populate it into Schedule template. schedule template is a form
if same DataAreaID repeats it need to count+1
how to check same DataAreaID