Finding the records bottom to top

shibilyshibily Member Posts: 89
Hi all,,
Anybody please tell me how to find the record from bottom to top. I have the last record by using the FIND('+') . I want to come one step backward .

How it is possible..


Thanks in advance

shibily

Answers

  • BeliasBelias Member Posts: 2,998
    use
    until myrec.next(-1) = 0
    
    instead of
    until myrec.next = 0
    
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • kinekine Member Posts: 12,562
    Or you can use ASCENDING(false) to sort the data in descending order if possible and you can go through in normal way. Next(-1) is not good for SQL caching etc.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • krikikriki Member, Moderator Posts: 9,110
    Remember that with ASCENDING(FALSE), you cannot use FINDSET. You need to use FIND('-')-NEXT.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.