July 12, 200421 yr 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.
July 12, 200421 yr 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 ]
July 12, 200421 yr Author 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.
July 12, 200421 yr 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
July 13, 200421 yr 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
July 24, 200421 yr 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.
July 24, 200421 yr 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.
Create an account or sign in to comment