Database Reference
In-Depth Information
Text Formatting Functions
Normally when you see data in a calculation field, it's displayed in the format (font, size,
style, color, and so on) you applied in Layout mode. Every character in the field shares the
same format, unless you want to manually search through all your records selecting the
words “Limited Time Only” in your Promotion Notes field, so you can make that bold and
red every time it appears. Not only does that method waste your precious time (especially if
you're on salary), but it also plays havoc with your design when you try to print the field.
POWER USERS' CLINIC: OUTSMARTING THE SMARTIES
LeftValues() and RightValues() are helpful when you need to pull some items from a return-
separated list. But they're also helpful when you want to protect your database from people who
know a few workarounds. Say you have a sales promotion going, where your best customers get to
pick one free premium from a list of four items. So you've set up a field with a value list and a set of
radio buttons. Everybody knows that you can choose only one item from a radio button set, right?
Apparently not, because you've got some salespeople who know they can beat the system by Shift-
clicking to select multiple radio buttons.
You just have to add an auto-enter calculated value to your Premiums field. Make sure you uncheck
the “Do not replace existing value (if any)” option. Here's how the calculation goes:
RightValues ( Premiums ; 1 )
Now your savvy salespeople can wear out their Shift keys, but they still can't select more than one
item in the premium field, because your calculation holds the field to a single value.
You can even add smarts to a Checkbox Set with a similar technique. Make this calculation:
LeftValues ( Premiums ; 2 )
People using the program can't select more than two checkboxes. FileMaker knows the first two
items they selected and just keeps putting those same two back into the field, no matter how many
checkboxes the salespeople try to select. For another twist, change the calculation to:
RightValues ( Premiums ; 2 )
Now FileMaker remembers the last two items selected, and very cleverly deselects the oldest value,
so that the field always contains the last two items selected from the Checkbox Set.
FileMaker's text-formatting functions let you specify exactly what bit of text you want in
18-point, boldfaced, red Verdana. And you don't have to visit a single record in person. You
just write a calculation and FileMaker does the drudgework for you, without tampering with
the real data.
FileMaker has six text-formatting functions:
Search WWH ::




Custom Search