Formula Fields
From AgileApps Support Wiki
Revision as of 23:32, 4 March 2011 by imported>Aeric (Text replace - 'Setup > Customize > ' to 'Designer > Data & Presentation > ')
A formula field is a field that contains a formula (as distinct from a field that is used in a formula). Formula Fields provide the ability to calculate dynamic values using Expressions and standard Functions. Formula Fields are added to Objects via Form Layouts.
Examples
Typical formula examples include the following calculations:
- calculate the number of days Past Due on an invoice record
- calculate a discount price (-5%) on orders over $1000
- create logical tests, such as: was this record created last year? last month?
- determine if a record is new, or changed from a prior value
For detailed examples and sample formulas, see Expressions.
To Add or Edit a Formula Field
- Click Designer > Data & Presentation > Object > {object} > Fields
- Click the [Add Field] button
- Choose a Field Type: Formula
- Name/Label/Title
- Name of the field
- Return Type
- Optionally, choose a Return Type
- Write an Expression in the formula
- Click the [Check Syntax] button to ensure that you have created a valid expression. If you receive an error message, review the content and revise the expression to correct the problems.
- Click [Save] to insert the formula field into the form layout.
Each record in this object now includes this formula field.
When the appropriate values are entered in the formula fields, the record will display the results dynamically.