transpower Posted July 12, 2004 Posted July 12, 2004 I'm still a newbie, but at least I know that to AND constraints for a find request I put values on one form and to OR constraints I put values on multiple forms. But after I do all that work, how can I save and load that request (and previous requests) at a later time? I've got several books on FileMaker but none of them seem to explain how to do that. Surely a user wouldn't have to go through all the steps of a find request to repeat it! I might want to set up scores of different selections for a particular file.
QuinTech Posted July 12, 2004 Posted July 12, 2004 Hi Transpower, one reliable way to do this in FM6 or prior: Make a script called "myFind". The steps in that script are: Enter Find Mode Set Field ( searchField , "criteria1" ) New Find Request Set Field ( searchField , "criteria2" ) New Find Request Set Field ( searchField , "criteria3" ) ... Set Field ( searchField , "criteriaN" ) Perform Find If [ Get ( CurrentFoundCount ) = 0 ]
transpower Posted July 12, 2004 Author Posted July 12, 2004 So, Jerry, for each selection I have to design and run a separate script. I would use Set Field to put each AND'd constraint on the form and then use New Find Request to create a new form(s) for the OR'd constraint(s). I could then have a menu of Find buttons for the associated scripts. Thank you very much.
Lee Smith Posted July 12, 2004 Posted July 12, 2004 Hi Transpower, This recent thread might be of interest to you http://www.fmforums.com/threads/showflat.php/Cat/0/Number/112597/an/0/page/0#112597 HTH Lee
QuinTech Posted July 13, 2004 Posted July 13, 2004 Hmmm... i'm not sure about "selection," but for each different find, you must make different scripts. For example, you have a database of food items with a field called FoodName. Script 1 is called "Find Fruits" and its steps are: Enter Find Mode Set Field ( FoodName , "Apple" ) New Find Request Set Field ( FoodName , "Banana" ) New Find Request Set Field ( FoodName , "Cherry" ) ... Perform Find Another script is called "Find Vegetables" and has the steps: Enter Find Mode Set Field ( FoodName , "Daikon" ) New Find Request Set Field ( FoodName , "Eggplant" ) New Find Request Set Field ( FoodName , "Fennel" ) ... Perform Find And, finally, you are right about the "AND" constraint... the script "Find Chilean Grapes" would have the steps: Enter Find Mode Set Field ( FoodName , "Grape" ) Set Field ( CountryOfOrigin , "Chile" ) Perform Find
bruceR Posted July 24, 2004 Posted July 24, 2004 Hmmm... i'm not sure about "selection," but for each different find, you must make different scripts.Not really. It IS possible to save criteria a user entered and reuse it. You could create one script, and after running it, save the request information in another table. This is easier in FM7 but people have been doing it in FM6 and earlier. It's easier yet with applescript. I've had a utility out for about 8 years that will capture requests from ANY open database and save them for reuse.
Ugo DI LUCA Posted July 24, 2004 Posted July 24, 2004 Yeah, Been doing this and was planning to post a demo I made when 7 went out. It's not a fully functionnal demo, while it works perfectly in my real life files. If someone wants to take a look, I posted it here in the Article section, where I already started this topic about a year ago. This is a fm5.5 version. The principles are the same as quoted by Bruce without any AppleScript, and only one script in each file.
Recommended Posts
This topic is 7427 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