Efficient Checkbox Data Storage

No Access? Watch the preview video here. EfficientCheckboxStorage_Pre.mp4
EfficientCheckboxStorage.zip300.3 KB
By Matt Petrowsky

It's one of those somewhat trivial projects (or so you think) until you get down to the "nitty gritty" of making everything work.

"All we need to do..." is always WAY more complex than what's thought. So it make sense that storing data in the most efficient and usable manner would go without saying. However, time and time again, I see database files where the data is stored the "FileMaker easy way" and this just shouldn't be done.

There are those rare cases when you should make a value list with your common names such as "Kindergarten, 1st grade, 2nd grade, etc.". But, more often than not, you should be storing your data in a more optimized fashion. Making it work within the user interface is what becomes the issue of implementation.

This video presents the optimized and efficient manner of storing some of your checkbox and radio button data. It's a great lesson on how to really structure some complex stuff in a very easy fashion!


One small gotcha

One small gotcha to be aware of, especially with the example you've shown--when using "0" as a value for your lists:

Since Filemaker considers "0" a "False" when evaluating as a Boolean, it's imperative when using this that you consider the possible ramifications to calculations elsewhere in which you'll use that field. If you have any that might result in the field being evaluated as a Boolean value, having a zero in your data list may return unexpected results.

For example, in our solution, the developer didn't consider this and as a result, there are some filtered portals in which Kindergarten students simply won't appear, though all other grades including Preschool (-1) work fine.

Matthew Miller
experientia docet

Certainly true

Any time you're going to use any of the techniques shown on this site, you need to take into account how they factor into your solution and the logic being used.

None of the techniques I present are offered as absolutes. You can always adjust them to account for various circumstances.

For example a tuple of values starting at zero can easily be shifted to one starting with the number 1 (0,1,2,3) may not work where what you really need is (1,2,3,4). It always depends and...

This is always a matter of who is doing the coding and how much they know about what they are doing. ;) +1 and -1 are amazingly good friends. :)


By Matt Petrowsky