Database Reference
In-Depth Information
Text Value Functions
If a field holds more than one chunk of text, with a paragraph symbol putting each chunk on
its own line, then it's very much like a value list. The data inside the list is called
return-sep-
arated values
. Text value functions let you grab individual lines from a value list. And since
you can so easily grab a particular line from a value list, you can use the
List()
function
(
Count()
) to put your data
into
a list to make it easier to grab.
Here's a simple example to show how parsing a value list works. Suppose you have a field
called Colors with a list of data like this:
▪ Red
▪ Green
▪ Blue
▪ Orange
▪ Yellow
The
LeftValues()
function works like its counterpart
LeftWords()
. It takes two paramet-
ers: the list to examine, and a number to specify how many values you want. This function
returns
Red
and
Green
:
LeftValues ( Colors ; 2 )
If
LeftValues()
doesn't do the trick, try
MiddleValue()
or
RightValues()
.
Use the
GetValue()
function when you need to parse just one value from a list. The value
you need has to be in a predictable place in the list, as in the whole-email-slammed-into-one-
field example at the beginning of this section. Say the email comes to you like this:
▪ Email From
▪ Email To
▪ Subject
▪ Body
You could grab the Email To address with this function:
GetValue ( Email ; 2 )
You can figure out how many values in a list with
ValueCount()
. Just tell FileMaker which
value list to count. The text parameter can refer to one or more fields or to static text. For ex-
ample, this function returns
2
: