User manual
Table Of Contents
- Preface Learning how to use FileMakerPro
- Chapter 1 FileMaker Pro basics
- Chapter 2 Adding and viewing data
- Chapter 3 Finding and sorting information
- Finding records
- Finding text and characters
- Finding exact matches in text fields
- Finding numbers, dates, and times
- Finding ranges of information
- Finding data in related fields
- Finding records that match multiple criteria
- Finding empty or non-empty fields
- Finding duplicates
- Finding all records except those matching criteria
- Hiding records from a found set and viewing hidden records
- Viewing, repeating, or changing the last find
- Sorting records
- Finding records
- Chapter 4 Previewing and printing information
- Chapter 5 Creating a database
- Chapter 6 Creating and managing layouts and reports
- Chapter 7 Customizing layouts
- Chapter 8 Working with related files
- Chapter 9 Protecting databases with passwords and groups
- Chapter 10 Creating scripts to automate tasks
- About scripts
- Creating scripts: an overview
- About ScriptMaker steps
- Control script steps
- Navigation script steps
- Sort, find, and print script steps
- Editing script steps
- Fields script steps
- Records script steps
- Windows script steps
- Files script steps
- Spelling script steps
- Open Menu Item script steps
- Miscellaneous script steps
- Changing scripts
- Duplicating, renaming, or deleting scripts
- Importing scripts
- Listing scripts in the Scripts menu
- Using buttons with scripts
- Example of a ScriptMaker script
- Chapter 11 Using formulas and functions
- Chapter 12 Importing and exporting data
- Chapter 13 Sharing databases on a network
- Chapter 14 Publishing databases on the Web
- About publishing databases on the Web
- How users work with databases on the Web
- What you need to publish databasesontheWeb
- Publishing databases on the Web: an overview
- Enabling FileMaker Pro Web Companion
- Configuring FileMaker Pro WebCompanion
- Enabling Web Companion sharing
- Setting up browser views
- Testing your published database
- About browser views for web publishing
- Chapter 15 Using ODBC with FileMakerPro
- Appendix A Customizing FileMaker Pro
- Appendix B Backing up and recovering files
- Appendix C FileMaker Pro Quick Reference (Windows)
- Appendix D FileMaker Pro Quick Reference (Mac OS)
- Index
Using formulas and functions
11-5
About functions
A function is a predefined, named formula that performs a specific
calculation and returns a single, specific value. You type the
function, and FileMaker Pro performs the calculation it represents.
Here are some examples of functions:
Most FileMaker Pro functions use the following syntax:
Function name (parameter)
Some functions require two or more parameters, as in this example:
Position(LastName,"Mc",1, 1)
You can use functions by themselves or combine them with other
functions or expressions. For example, you can nest one function
within another:
If(IsEmpty(LastName), “Warning!”, “OK”)
For more examples showing how to use calculation formulas and
functions, see the Calculations and Scripts file in the Tips from Tech
Support folder in the Templates folder in the FileMaker Pro 5 folder.
Note In the United States, commas act as list separators in functions,
formulas, and calculations. In other countries, semicolons might be
used as list separators. The separator depends on the operating
system your computer uses, as well as the one used when the file was
created.
The following sections summarize the FileMaker Pro functions by
category. For detailed information about each function, and
examples, choose Help menu > Contents and Index, click the Index tab,
and type the name of the function.
Text functions
Text functions manipulate text. Use text functions to combine,
isolate, compare, quantify, change, or convert data of type text.
The parameter text can be a text expression (in quotes if it is a
constant) or the name of a Text field. To use a space as a text
expression, type a quote, then a space, then a quote (" ").
Example: RightWords(Name, 1) returns Jones when the Name
field holds William R. Jones.
This function Returns
Average (Score1, Score2,
Score3)
The average of the three scores
Round(SalesTax,2) The amount of sales tax rounded to two
decimal places
Length("John") 4 (the number of characters in the text
"John")
Position(Name,"Mc",1,1) The position of the first occurrence of
"Mc" in the Name field
This part Represents
Function name The calculation to perform.
parameter The value or expression on which the calculation is
performed. Most functions require one or more parameters. A
parameter can be a constant, a field name, another function,
an expression, or a database structure or situation.
( ) The beginning and end of the parameter.
Syntax Definition
Exact (original text, comparison
text)
Exact (original container,
comparison container)
Compares original text and comparison text.
Returns "1" if they match exactly, "0"
otherwise. Exact is case-sensitive.
Compares original container and
comparison container for exact match.
Returns "1" for a match, "0" for no match.
Left (text, number) Returns the character(s) in text specified by
number, counting from the left.
LeftWords (text, number of
words)
Returns the word(s) in text specified by
number of words, counting from the left.