FINDSET - can I start over at the beginning?

Mike_HWGMike_HWG Member Posts: 104
So I have the basic Item.FINDSET - REPEAT - UNTIL Item.NEXT = 0.
If I want to do another loop and start over at the beginning, is there a way to do that or do I just call FINDSET again?

Note, this is just out of curiosity for an experiment I'm doing. If this was production-level code, I would of course be consolidating loops :wink:
Michael Hollinger
Systems Analyst
NAV 2009 R2 (6.00.34463)

Comments

  • ara3nara3n Member Posts: 9,256
    during the loop yes you can point the current record back to the top by dong findset or find('-') be aware that you could end up in infinite loop.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • bbrownbbrown Member Posts: 3,268
    The result will depend on whether you are doing this inside a write transaction. If so, then the second FIND will return the same result as the original plus any changes made by your transaction. But if you are not, then it may not as other users could have updated those records.
    There are no bugs - only undocumented features.
Sign In or Register to comment.