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

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

Recommended Posts

Posted

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

Posted

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.

Posted

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.

Posted (edited)

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
Posted

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.

This topic is 5527 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.