I want to retrieve the first sales order number, from the 2 sales orders number having same PO number… if anybody can help?
Well, if the value on the order number is gonna be the same and you want to get always the first row after every duplicate of it… This will work, Copy the excel sheet in to a DT have a counter value after each row iteration. For each counter+1 iteration (like 1,3, 5) check if it equals the value row(“Sales Order Number”).ToString.equals “counter +1”. if yes, there you go… and retrieve the row(“PO number”).ToString for that counter value. Hope this helps. Cheers.
Hi,
Can you try the following expression?
dt = dt.AsEnumerable.Where(Function(r) r("Sales Order Number").ToString=dt.AsEnumerable.Where(Function(r2) r2("PO Number").ToString=r("PO Number").ToString).First().Item("Sales Order Number").ToString).CopyToDataTable
Regards,
It’s not giving expected solution
Hi,
We can easily get them from datatable as the following.
Or can you show us which variable type you want to get as result?
Regards,
Can you show the output here or share the sequence, and please read the Question again …I made a change
Thank you so much. It is working.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.