User manual

Table Of Contents
11-2
FileMaker Pro User’s Guide
Expressions
A formula contains one or more expressions. An expression is a
value or any computation that produces a value. Expressions can be
combined to produce other expressions.
Constants
A constant is a fixed value that’s part of the formula and doesn’t
change from record to record. A constant can be text, number, date,
or time, like the text value “Europe” or the numeric value 0.05. Text
constants in formulas can be up to 253 characters long.
Important When you use a constant in a formula, use the correct
format.
Field references
A field reference is a field name that acts as a placeholder for the
field’s value. When FileMaker Pro evaluates the formula in the
current record, the value in the field represented by the field
reference is used in the calculation.
To define a formula that references a related field, “Defining
calculation fields” on page 5-5. The syntax is Relationship
name::Field name. For more information about related fields, see
chapter 8, “Working with related files.”
Note References to related fields can become invalid when you
move or rename a related file, or delete a field in that file. Also,
changing the field type or number of repetitions of a related field can
cause unexpected behavior.
Type of expression Example
Text constant "London"
Number constant 2.15
Field reference TaxRate
Function Length(ShipToAddress)
Combination of expressions ((Total–Discount)*TaxRate)/100
For this
type of
data When you type a constant Examples
Text Enclose the text in quotation
marks (")
"Montréal"
"514 555 1212"
Number Don’t include thousand separators
or currency symbols.
123
1234.56
Date Use the value as a parameter of
the Date function or TextToDate
function. See “Date functions” on
page 11-7, “Text functions” on
page 11-5.
Date(2,2,2001)
TextToDate("04/04/
2000")
Time Use the value as a parameter of
the Time function or TextToTime
function. See “Time functions” on
page 11-7, “Text functions” on
page 11-5.
Time(4,14,32)
TextToTime("02:47:35")
This expression Returns
Invoice Total*0.075 7.5 when the value in the Invoice Total field
is 100
First Name & " " &
Last Name
John Jones when the value in the First Name
field is John and the value in the Last Name
field is Jones
Invoices::
Invoice Total*0.075
7.5 when the value in the Invoice Total field is
100. The Invoice Total field is located in a
related database.
For this
type of
data When you type a constant Examples