I've reached a bit of a dead end with an idea I need to implement in my database.
Here's my situation and what I would like to do:
My database consists of multi-page forms that the users fill out. Each form has its own table due to the large number of fields required per each form. One field (Job#) is present in all tables and I've used it to relate the tables together. I’ve set up a simple form and script to view multiple forms, picked by the user, simultaneously in different windows.
What I need FM to do is automatically filter the displayed forms to show only the records with a Job# specified by the user. I know that you could manually sort each form by Job# using the Find tool but with 60+ different forms this is too time consuming. I was expecting to be able to use the Perform Find script command to do this but FM wont let me enter a field value (variable) for a Find Request Criteria.
To illustrate the script I would like to run:
Perform Find 
Action = Find Records
Criteria= Form::Table: [XXX]
Where XXX is the Job# specified by the user
Is there simple way to do what I need that I’ve just not noticed or figured out yet? I’m a novice at using FM. Any input or ideas would be greatly appreciated. I only hope I’ve explained my situation clearly enough! J
Have you tried using a global field? I haven't looked into how FM7 uses globals with the new tables format, if you can span multiple tables with it, but this used to be the way to pass a variable to a script.
Yep, I ended up using a method using global fields suggested by a fellow on another board. In case anyone here is interested:
It's true that the Perform Find script command in FileMaker v7 does not support the use of field values. However there are some relatively simple alternatives.
One way you might go about it is to set up your script to transfer the value(s) that you want to find into a global field prior to entering find mode, then use a Set Field[ ] comand in find mode to transfer the contents of the global field into the relevant field you wish to search on and then have the script perform the find without specified criteria (it will use the criteria entered by the Set Field [ ] steps).
That way your finds can be fully scripted, yet can also be dynamic.