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.
Type of expression Example
Text constant "London"
Number constant 2.15
Field reference TaxRate
Function Length(ShipToAddress)
Combination of expressions ((Total–Discount)*TaxRate)/100
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.
For this
type of
data When you type a constant Examples
Text Enclose the text in quotation "Montréal"
marks (")
"514 555 1212"
Number Don’t include thousand separators 123
or currency symbols.
1234.56
Date Use the value as a parameter of Date(2,2,2001)
the Date function or TextToDate
TextToDate("04/04/
function. See “Date functions” on
2000")
page 12-7, “Text functions” on
page 12-5.
For this
type of
data When you type a constant Examples
Time Use the value as a parameter of Time(4,14,32)
the Time function or TextToTime
TextToTime("02:47:35")
function. See “Time functions” on
page 12-7, “Text functions” on
page 12-5.
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.
This expression Returns
Invoice Total*0.075 7.5 when the value in the Invoice Total field
is 100
First Name & " " & John Jones when the value in the First Name
Last Name field is John and the value in the Last Name
field is Jones
Invoices:: 7.5 when the value in the Invoice Total field is
Invoice Total*0.075
related database.
100. The Invoice Total field is located in a