I would like to script a process by which I save multiple copies of the same file. But I would like each file to save a specific found set - a subset of the records in the file
No problem with the Find, the loop, the dynamic filename and path.
My particular issue: Is there a good way to do a "Save a Copy As..." with only the FOUND SET of records, without the need for a clone file and doing a bunch of imports?
Thank you in advance for your thoughts.
DSW
save a copy as... [Found Set Only]
2 posts
• Page 1 of 1
Posts: 4
Joined: Mon Oct 31, 2005 7:54 am |
|
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
There is no straight forward way to do what you're asking; FileMaker wants you to "export" found sets, not use "save a copy". You could, of course, import that exported found set into a template file you have waiting. You can even export the template files as needed, having stored them in a FileMaker Container field.
(Fringy stuff follows.) This can get kind of cool in FM8. The trick would be calling a script in the newly exported template, as while you can name the exported file using a $variable (search FM8 help for "variable" select "Using Variables" and click on "Creating File Paths") you can't call a script in a file using a variable as a file reference. So, I think you'd want your "template" to have a script that runs on startup and imports the current found set - whatever that may be - from your main file. In that case your workflow could look like this... - Build a found set in the main file. - Run a script to export a new copy of your template file. - Open that file and it would run its Upon Opening script to import your found set from the main file. You could then use SendEvent (Mac) or Send DDE Execute (Win) in your script to open the file you just exported (as these *can* use variables to specify the file in question). That would make the whole thing a one-click affair. You would of couse have to run one import for every table you're interested in, but that is just the way it is. Finally, the 'import the found set on opening" script in your template should probably set a flag when its done so it doesn't try to do that *every* time it is opened. =) HTH John Sindelar
SeedCode |
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 4 guests