Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8101 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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?

Posted

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

Posted

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.

This topic is 8101 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.