Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Multiple search using checkboxes

Featured Replies

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

From FileMaker

  • 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.

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.

  • 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

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

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

  • 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

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.