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.

filtering records with checkboxes/dropdowns?

Featured Replies

Hi,

I'm only a year old when it comes to FileMaker, so I apologize if this is simple stuff I'm asking about.

This is on FM10 used by about 10 people, hosted on Server 10.

I have a set of records (they happen to be "tasks performed" and include stuff like User, Date, Task, Status, Client, etc.).

I'd like to set up a solution where, either in the header or wherever is convenient, users can select options to filter results in real time. One such filter may be a drop-down menu of Users, or a couple of date fields to select a range, and the biggest one would be 15 or so checkboxes to select Clients. Our Clients list is static enough so that it's not necessarily bad if I have 15 fields dedicated to this purpose (even if it is bad programming ??? .

So I'm not sure as to the main design. Do these filter fields have to be in a separate table that would somehow be related? If they're in the same table, then wouldn't one user checking off boxes affect another user's results? One thing I do realize is that script triggers should be a big part of this.

I'm not sure where to begin and would really appreciate help.

Thanks a lot.

Edited by Guest

You can use global fields to allow users to enter their criteria. Then with a script trigger on these fields, you can use OnObjectExit to run a find script with constrains.

  • Author

Thanks.

If one user changes said global fields by making their filter selections, won't another user be affected by it? Do global fields differ from user to user?

yes they do. I would read up on the nature of global fields in a served environment.

  • Author

OK, I did that and I have the basics down.

My current problem is this: We have 2 sets of clients (let's call them ClientsA and ClientsB). Each is consistent of about 15 entries and each is a pretty static list.

So I made 15 global fields for ClientsA and represent them as checkboxes with a value list of "1". Now, whenever I check those boxes, the OnObjectModify script trigger is first clearing all found records

Show All Records

Show Omitted Only

then running through 15 If statements for each possible ClientA entry

If [Tasks::checkboxJohnson="1"]

Extend Found Set [Restore]

End If

where Restore is Tasks::ClientA:[Johnson] and Johnson is a reference to each of the 15 possible ClientA names.

However, when I get to ClientB, I'm not sure how to do it. Occurrences of ClientA and ClientB can be in all sorts of combinations. So if I do Extend Found Set for an occurrence of a ClientB entry, it will find records that don't have ClientA entries that I care about.

If this is all too convoluted, telling me to buzz off and do some reading is acceptable. :

Create an account or sign in to comment

Important Information

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

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.