jfurness Posted February 18, 2001 Posted February 18, 2001 I am trying to create a search page which allows the web user to perform a find on a single field but with multiple selection - BUT using an OR statement across that field. i.e Hair Colour, search for people with hair colour BROWN or BLONDE, but not RED ...using check boxes As far as I can tell, filemaker predermines that the search criteria is BROWN and BLONDE - which of course is impossible! :-) Any help much appreciated. J
jfurness Posted February 18, 2001 Author Posted February 18, 2001 ... except... when you check two options in a field with multiple options - FileMaker always performs a AND search so always looks for BROWN and BLONDE, not either - even if I use the -LOp tag - unless of course I'm not using it correctly.
Vaughan Posted February 18, 2001 Posted February 18, 2001 Try making two instances of the field in the form: one for blonde and one for brunette. I'd not use chechboxes for these fields, only one option to be selected in each field. Use the "or" operator.
jfurness Posted February 19, 2001 Author Posted February 19, 2001 tried this too - and the same is true - performs an AND find when searching the same field on the same form. Any more thoughts - please post and I'll try them out. J
Keith M. Davie Posted February 19, 2001 Posted February 19, 2001 Consider an exact search. As in: <input type="hidden" name="hair" value="=="> <input type="text" name="hair" value="" size="10"> This would provide a space to type in blonde, red, etc. Peace Keith
Keith M. Davie Posted February 20, 2001 Posted February 20, 2001 Checkboxes - not the best idea. The problem with a checkbox is that it allows multiple choices IN ONE FIELD. If one option has been selected in one record and another option selected in another record, both will be found because a checkbox does not search for OR. To get a better idea of what is occurring in the database where your field is a checkbox, make another layout and display the "checkbox" field, but format it as text. Check several boxes in the checkbox layout and then look at the text field in this new layout. You are dealing with a valuelist, and each value selected is displayed. Multiple values can occur in one field in one record. Checkboxes and multiples in one field are a bad idea. It is better to do an exact search of two or more fields. These often can be hard-coded as buttons (Form Action) or images (Action Links) and neatly arranged in tables so that the person clicking on "blonds" is actually looking for "dumb" "blond" "males". What field choices are made and how you accomplish this will vary on your needs. Hope you find this useful. Peace Keith
jfurness Posted February 22, 2001 Author Posted February 22, 2001 Cheers Keith, I've started to go someway down this road already having discovered how impractical checkboxes are. Your table idea is a really good thought - I had otherwise wondered how to offer the different search criteria in an easy to understand interface - the table might just do that. I think this discussion well answers my original Q. ...it can't be done easily!! Jonathan
Recommended Posts
This topic is 8676 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