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.

Restoring found set from a script.

Featured Replies

Hi All,

I am performing a find in a script with error capture on to display a custom message depending on the results. When no results are found, how can I restore the found set instead of displaying zero results or showing all records?

Thanks

You could capture the IDs of the existing found set in a global text field. Then, in the If (Get Foundcount) = 0) section of your script, you could gtrr, existing layout from the global field to the record's primary key.

BruceR had a neat post recently about capturing a found set of IDs.

  • Author

Thanks. That was pretty much what I had in mind. I know I could loop through and collect the IDs but is there any onther technique? Looping seems like it might not be seemless enough if it's a large founs set.

Here's a link to Bruce's technique that I mentioned above. Link

Bruce's is a great new routine for capturing the IDs of a found set, which could be used to restore a found set (among other things). But there is an easier and faster way to just capture and restore a single found set.

http://www.sumware.net/robfm2/?p=4

It is a little weird to wrap your head around at first. It exploits the built-in tie between a table occurrence, a layout and a found set. It gives you some insight into what a table occurrence group means. The operation is pretty much instantaneous, even with large record sets.

Its one limitation is that you have to specify which layout to return to, directly within a Go To Related Record step, when you do the "restore found set." But you can switch to another layout afterwards, using a captured name or id.

Edited by Guest

  • Author

Great! Thanks so much as always guys. I will let you know how it works out. :(

Another option is to do the Find in a new window. If nothing is found you simply close the window. Not only do you retain your found set, you also keep your Sort order.

A really cool implementation of this that will save you a ton of time and knock your client's socks off is fmSearchResults.

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.