Help with Syntax

,

Is anyone out there tonight that can help me with this syntax? It works on the ttOrderDtl but not the dsOrderDtlRow

i think you are wanting dsOrderDtlRow.OrderByDescending(dtl => dtl.OrderLine).FirstOrDefault()

Thanks a bunch. Having to work possibly all weekend to get this BPM working as the deadline from the owners is Monday. Quite frightened I will not make it.

Trying it now.

By the way is there a book you would recommend so that I can understand all this .orderbydecending .select .Max() stuff?

image001.png

Check this out:

Still getting it fussing at me. Here is what it says

image001.png

Oh thats a single record, theres nothing to order.

From working on this BPM I know there is 9 records in it and when using the temp tables with the help of others I got the code to not fuss. Unfortunately the data I need is in the dataset called dsOrderdtlRow and the field is called ordernum. I am sure it is simple but I just don’t have the knowledge to find the correct syntax.

image001.png

If I just set this to dsOrderDtlRow.Ordernum in the BPM when it runs I have a messagebox to show me what it gets. It responds with a message that multiple rows exist.

image001.png

what are you trying to achieve @tthayer ?

This was a long weekend as today was the deadline. I ended up getting a programmer to help as I was unable to resolve on my own.