Magic Key, part 2 — Filemakerhacks

Normalizing check box data.

Part 2 of Magic Key By Kevin Frank

I ended yesterday’s article promising a couple improvements on the techniques showcased therein. To avoid unnecessary repetition I am going to assume you have read it.

The first improvement is to eliminate the highlighted steps in the “parse current field” script. Is it really possible to create a related record and populate multiple fields in that record using a single Set Field step?

Absolutely, and you can follow along in today’s demo file, magic-key-multipredicate-check-box-reporting, if you are so inclined.

Multi-predicate “Allow Creation” Relationship

We want to create a record in Tasks, like the one below, and populate all the highlighted fields using a single Set Field step…

…so we need to change the Magic Key relationship from single-predicate…

…to multi-predicate as follows (having previously defined a new global text field, g_category, in Volunteers):

As long as all the relational operators are equi-join (=), “allow creation” will work, and the “parse current field” script can be divested of a couple Set Field steps. The other change to this script is that the highlighted line now populates g_category, as opposed to $field in yesterday’s demo file.

More…Magic Key, part 2 — Filemakerhacks.

Liked Liked
Need FileMaker Development Help? Or to purchase FileMaker Software?
Contact FM Pro Gurus for help