Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Returning to the previously visited record in a found set

Featured Replies

I have a found set of records and I would like to run a script on each record in turn. The problem is that when the script runs a different set of records is found, I can then return to the original found set but I need to find a way of returning to the record that I was in previously prior to running the script so I can go to the next record and run the script again and so on and so forth. I only want to run the script once for each record in the original found set. Thanks in advance.

Are you really using version 6, as your profile shows?

  • Author

Are you really using version 6, as your profile shows?

Actually I'm running FM 6 at work and FM 11 at home, although my employer has finally agreed to let me have FM 11. The above query is for a FM 11 database.

To be honest, I'd rather use FM 6 than not at all. Couldn't face going back to MS Word & Excel.

In version 7 and above, you can open a new window, do a find or whatever else is required, then close the window to return to your original record and found set.

  • Author

In version 7 and above, you can open a new window, do a find or whatever else is required, then close the window to return to your original record and found set.

Can opening the new window, doing whatever and closing the window be automated within a script?

Yes, of course.

  • Author

Would it be:

New Window

Perform Script

Close Window

I have tried the above, but I get an error message because the Perfom Script has to work on the record that I am in within the original found set.

When you open a new window, it inherits the found set and the current record from the original window.

  • Author

6420e5454daa687c58f525f4ec7b7808b39ba0b9

I imagine I'm doing something wrong. In the above script I'm not sure where to place the New Window and Close Window script steps.

I don't understand what your script does. I believe the order should be something like:

Find the records you want to loop through

Go to the first record

Loop:

Open a new window

Do something

Close the current window

Go to the next record

End loop

  • Author

Thanks comment, the script worked fine except 'update driver history X 1' didn't run for the first record (see below). Didn't run on last record too but I think that's to do with the script step 'Go to next record,exit on last' exiting before 'update driver history X 1' can run.

78b31d413bb6bdca5dc6f8c28fab24d18f6683c7

You get this error because you have an uncommitted record in the original window. Try committing records before starting the loop.

A loop using 'Exit after last' should exit AFTER the last record has been processed.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.