December 28, 200520 yr Hello! Attached is the current interface I'm creating. [account name:test password:test] I would like to be able to search the database by selecting three cities, counties, zip codes, etc. Currently, one may choose multiple descriptions and an employee size range. But I'm not sure how to construct a script that will search the database based on the specified parameters [ie. selecting 3 possible cities, counties, zip codes]. When I try to search by more than one city, county, or zip code, it finds no matching results even though there are records under these specifications. I appreciate the help! Any tips on how to improve this is also greatly appreciated. Thanks, Sara help.zip Edited December 28, 200520 yr by Guest
December 30, 200520 yr A few tips: 1. I would not use the "City 1" field on the "find page" layout since it looks like it displays raw data in Browse mode. If your user halts the find request at this point then any entries they make will change the database. 2. To perform "or" operations in your find request create new records in find mode. Then use a "Constrain found set" step to add criteria for the Counties. Something like this: Enter find mode Set field [City, City1] If (not IsEmpty (City 2) New Record/Request Set field [City, City 2) End If If (not IsEmpty (City 3) New Record/Request Set field [City, City 3] End if Perform find # Add County criteria Enter find mode Set field [County, County1] If (not IsEmpty (County 2) New Record/Request Set field [County, County 2) End If If (not IsEmpty (County 3) New Record/Request Set field [County, County 3] End if Constrain found set Good luck!
December 30, 200520 yr Author I appreciate your help greatly! I'm still constructing the script, however, how can I enter more than one target field for 'set field'? I know it is probably easier than I think =) Keep in mind I'm a novice. Thanks again for the prompt response. Take care, Sara Edited December 30, 200520 yr by Guest
December 31, 200520 yr how can I enter more than one target field for 'set field'? I suggest that you try it out in find mode before you code it into a script. What you'll see is that if you enter values into multiple fields in a single record they behave as though connected by logical " and" statements. On the other hand if you create multiple records (in find mode) and fill in different values into the same field they will be treated as logical " or" statements. I think you should be able to use the sequence of steps that I indicated in my original post. I was too lazy to use your exact field names, but I hope you got the point of it. To answer your question above, if you have sequential "set field" steps then your script will enter values into multiple field in the same record (which will be treated as logical "and"). I suggested using "New Record" steps, while in find mode, to allow criteria to be added as a logical "or".
January 1, 200620 yr See the attached modification of your file. It includes: 1. Removed your records (for privacy) 2. Changed City and County fields to global storage 3. Added script "Find City County" 4. Added "find page Copy" layout. One difference is that it pauses to have the user enter search criteria while in Browse mode, not Find mode. Happy new year! HelpClone.fp7.zip
January 1, 200620 yr I would like to be able to search the database by selecting three cities, counties, zip codes, etc. Do you think it is likely that anyone actually wants to do this? Another choice is just to keep it simple and let them search for one city at a time.
January 2, 200620 yr I agree with Bruce. If you're users learn how to use filemaker they can form complex searches on their own - without the use of a fancy search page. To make it a little easier for novice users you could set up a simplef "search" layout (in a list style) with the relevant fields with "and" labels between each field. Make a script with a button labeled "or" which performs a "new record/request" script step to generate a new find record to allow multiple counties or cities to be specified.
January 17, 200620 yr Author I agree with all you guys. =) The demands I've received are straight from the users themselves. I'm about to take a look at the database, however I will propose your suggestions as I think they are excellent. I appreciate your help. Thanks, Sara
Create an account or sign in to comment