I Have a datatable shown below
Here, i need to select only the row of first occurance of Candidate number and fetch the entire row, then jump to the next unique candidate number…
for example, Candidateno = 1234, which is repeated 3 times but i need to fetch only Row1 and then jump to next Candidateno =7895,which is row4, so on
Can any1 help me with this?
In Case of the datatable inly have 1 datacolumn following Statement can be Used as Well
I have many columns corresponding to unique candidateno,
I dont want to copy the result to new table, i mean i dont need a new table, i just want to find the indexof first occurance of the Unique id and then move to next unique id in a for each row…
Why does it matter if you use a new datatable with the duplicate rows removed, or if you use the existing datatable and skip duplicate rows? The end result is exactly the same, but it’s much easier programmatically to just create a new datatable variable than it is to code something that skips over rows on your existing table. New datatable is quicker to code, easier to read/understand, and will be faster to process
Just use a for each row loop, capture the value of the index in a variable, and use an if statement that compares the current index to the variable; if they are equal then X else Y
You can try this
BlankProcess2.zip (39.4 KB)
Hope it helps
Thanks Your Replay, I also tried the lookup datatable but got stuck…
You provided me Exactly what i was Expecting.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.