February 18, 200124 yr 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
February 18, 200124 yr Author ... 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.
February 18, 200124 yr 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.
February 19, 200124 yr Author 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
February 19, 200124 yr 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
February 20, 200124 yr 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
February 22, 200124 yr Author 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
Create an account or sign in to comment