kjenning Posted December 27, 2001 Posted December 27, 2001 I am VERY new to FM Pro, and I've recently been handed a sophistocated set of FM databases to provide maintenance for. After searching the help file, and this site, my question is this: Is it possible to determine the criteria that is being used in a FIND step within a script? I have a script that performs a SetField[] on a particular field prior to executing a search, but I don't see a way to immediately find if it's looking for <, >, or = (or combination thereof). Example: if the IDnum for a table is set to 1000, how do I know if the find is searching for all records with IDnum <1000, >1000, or equal to 1000? I know, I could execute the script, however, I don't wish to wait the 20 minutes it takes to compile the results. AND there are numerous scripts that I'd like to determine this criteria on. Thanks in advance, -KJ
Thom Posted December 27, 2001 Posted December 27, 2001 You can print the script. The Print dialog has an option to print the "Script definition for" your script. Find requests are listed under the Perform Find step in the print out. I use a generic/text printer driver and specify "Print to file", so I don't have to kill trees, if I just want to look at the script or copy and paste it into a message.
tlsparker Posted December 28, 2001 Posted December 28, 2001 It is possible to store find criteria in a script. These criteria do not appear as lines of code in the script; the stored criteria are simply the last find completed before the action was stored. To find out what these criteria are, insert a pause script step in your script immediately after the find. Then, after the script is paused, cancel the script and use the re-find function (ctrl-R on Windows or Apple-R on a Mac). This will take you to find mode and bring up the last find criteria used in that particular file. Hope that helps, Tom Parker [email protected] http://www.tgparker.com/filemaker
kjenning Posted December 28, 2001 Author Posted December 28, 2001 Yes. Mr Parker has provided a means to answer my question. I did try to print out the scripts, as Thom suggested, and while it's nice to get a printed copy of the script, it just didn't provide the means of determining the exact criteria. Thank you to everyone who responded. -KJ
danjacoby Posted December 28, 2001 Posted December 28, 2001 If you're in Find mode and a number field contains only a value (such as the IDnum field containing "1,000"), then the search is for those records where the value equals whatever was entered in Find mode. For unequal values, you need to add a symbol (such as "<"). If the search is scripted, you can add a pause to the script. If the only relevant script step is "Perform Find [Restore]", you can add a step before this step: "Enter Find Mode [Restore, Pause]". That'll show you what the find criteria are. HTH, Dan
kenneth2k1 Posted December 28, 2001 Posted December 28, 2001 Hello: Actually, in my limited experience, I think it is a good idea to print out all of your scripts and keep them stored in a folder or something. This way you have documentation of all the scripts. This may have helped you if the person who designed the solution you're working on now had done this. If you have: Perform Find [Restore] it will perform the last find that was done for this script. By printing them, you can see what these find requests were. If you have: Enter Find Mode *then something like this* Set Field [some entry] *or* Insert Calculated Result [some entry] Perform Find [] it will perform find those values that you have set. I'm sure you probably already knew this. Good luck Ken
Recommended Posts
This topic is 8370 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