sandyinlet Posted November 12, 2008 Posted November 12, 2008 I have developed a productive scripted routine to generate finds. However, sometimes no records are found which meet the current criteria. If the user started with a subset of records I'd like to return the user to that former set, rather than dump them back into all records. Is there an efficient way of storing the current set of records at the beginning of the routine so that this set could be restored if necessary?
Fenton Posted November 12, 2008 Posted November 12, 2008 (edited) There is a fairly simple but awesome method to save the found set then restore it. It's a little difficult to explain in a few words, and I can't find the darn URL where it was invented/explained (anyone?). It uses a simple trick, to Go To Related Records of the table occurrence you are ON, but choose a layout of another table occurrence of the same base table which is NOT connected. FileMaker dutifully transfers your current found set to that other layout, where it just sits (during the current session on hosted files) until you want to go get it. It is very fast. To retrieve the found set, you do much the reverse. You go to the Found Set (FS) layout (and table occurrence), then Go To Related Records on IT, choosing a layout of your current table occurrence. This is one glitch with it; you must specify a layout to return to. Since you may want to "save" the found set from different layouts (of the same table occurrence), then you'd want to pass a script parameter to tell it which you wanted to return to. Of course, if this all happens within a single script, such as a Find, then you know which layout to return to. [P.S. One usually uses this with only 1 "saved found set", but you could create more table occurrences in order to save more than 1. I could see how 2 might be useful occasionally, in a complex script.] Find_wFS.fp7.zip Edited November 12, 2008 by Guest
sandyinlet Posted November 12, 2008 Author Posted November 12, 2008 Works beautifully. Thanks for the demo file and the solution.
Recommended Posts
This topic is 5854 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 accountSign in
Already have an account? Sign in here.
Sign In Now