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
Chapter 11
Using formulas and functions
This chapter:
1 introduces formulas and functions
1 lists the places you can use formulas and functions
1 shows the components of formulas
1 describes operators you can use in formulas
1 gives a brief description of all functions
See Help for more detail and examples for each function.
About formulas
A formula is a specific operation on one or more values in the
database. For example, suppose your file contains two number fields,
Unit Price and Quantity, and one calculation field, Extended Price.
You want to calculate a value for Extended Price in each record, so
you define a calculation field with the formula:
Unit Price * Quantity
for the Extended Price field. Then, each time you type values in Unit
Price and Quantity, the formula multiplies those values and displays
the result in Extended Price.
You create formulas in the Specify Calculation dialog box
(see“Defining calculation fields” on page 5-5.) You can use
calculations in several areas of FileMaker Pro.
Formulas can include any combination of constants, field references,
operators, and functions. (See “About functions” on page 11-5.)
These elements are arranged in a particular order, or syntax, to
produce expressions giving the result you want. The following
sections explain each formula part and its syntax.
Important The data type (Text, Number, Date, Time, or Container)
of fields and expressions referenced in a formula, and the result
returned, are important. For example, if a date calculation is set to
return a number result, the calculation does not return a date.
When you mix data types in calculations, use the data type
conversion functions (TextToDate, TextToTime, TextToNum,
DateToText, TimeToText, NumToText) to convert data and
expressions to the correct type. These functions are documented in
the Text, Number, Date, and Time function tables below.
To use formulas See also
When defining
calculation fields
“Defining calculation fields” on page 5-5
In certain script
steps
Help topics for the If, Exit Loop If, Set Field,
Insert Calculated Result, and Replace script
steps. Choose Help menu > Contents and Index, click the
Index tab, and type the name of the script step.
To auto-enter
calculated values
“Defining automatic data entry” on page 5-8
For data validation “Defining field validation” on page 5-9
When using
Replace with
calculated results
“Replacing data in fields” on page 2-10