15 Replies Latest reply: Oct 16, 2012 6:04 AM by Sabrina Richter RSS

    How to get last row having the same ID

    Sabrina Richter

      Hi all,

      until now I could always get the last record by using peek(...,-1) or previous(). But now I need the last record where my field 'EbeneID' is the same. So I load data like this (just ignore the text is always the same, just for showing issues):

      IDEbeneIDText
      11some Text
      22some Text
      33some Text
      42some Text
      51some Text
      62some Text
      73some Text
      81some Text

       

      Now I want to get the text of the previous record with the same EbeneID without order the table by EbeneID (in real the table is much bigger, and it is not really an ID, its all about HTML-Code, so it is not possible to order the table and get the right text each!)

      I need something like:
      previous(text where previous(EbeneID) = EbeneID) , sure this doesn't work

       

      Thanks in advance!