September 22, 200223 yr How do you loop through all records in a file without munging the found set? The user is in layout A or B or C. He clicks to go to layout D. Found set and the current selected record should remain the same. But before bringing up D, I want my script to loop through all records in the file making some changes. Writing the loop is not a problem. Writing it such that it doesn't eliminate the users found set and leave him in the last record in the file is another thing. Hints?
September 23, 200223 yr A few steps are necessary. The script looks like: SetField(gCurrentRecord, Status(CurrentRecordNumber) Loop . process records . . Exit after last End Loop Show Omitted Go to Record/Request/Page (first) Loop . process records . . Exit after last Show Omitted Go to Record/Request/Page (by field, gCurrentRecord) The other way is to mark the records in the current found set by writing their RecordID's to a global field, showing all records, processing them, and finally restoring the found set by a relationship between the global and the record id using a Go to Related Record. -bd
September 23, 200223 yr Somehow I do not understand correctly this -- just by switching layouts you are not loosing the Found set. By processing and/or omitting some records -- yes. But records can be flagged and marked as LiveOak suggested.
September 23, 200223 yr Author Loop Show Omitted Loop Show Omitted Ahhh, of course... can't believe I didn't think of that. Thanks!
Create an account or sign in to comment