APPLICATION DESIGN
Writing field formulas
Use the Reference tab in the Programmer's pane to access the list of fields, @commands, and @functions. You can use the Reference list as a shortcut for looking up @functions and @commands, and for pasting them into the formula.
Computed field formulas
Computed fields are used to automatically enter data, such as the author's name or the date, in a field. You can have more than one computed field on a form. Computed fields require formulas to supply their values. For example, you use a computed field to assign a creation date to a document. Computed fields are normally recalculated when users create documents, choose View Refresh Fields, press F9, or save documents. Selecting the field property "Compute after validation" is useful when a field is dependent on values in other fields and you want to be sure that the calculation occurs after those fields have been validated.
When it's important for users to see results as they proceed, you can force each field to be calculated as it's filled in by selecting the form property "Automatically refresh fields." This is useful when fields at the bottom of the form are dependent on field values at the top. Be aware that this property can slow down document display time if the form has many computed fields.
There are three types of computed fields:
1. Select any type of computed field.
2. Select Value from the Objects tab of the Info List.
3. Write a formula, a field name, or a text string in quotation marks in the Script area of the Programmer's pane.
4. Click the green check mark to verify and save the formula.
5. (Optional, for computed or computed-when-displayed fields) To delay computing until after validation formulas run, choose Design - Field Properties and select "Compute after validation" on the Field Info tab.
6. (Optional) To recalculate field values while users edit a document, click the form and choose Design - Form Properties, click the Form Info tab, and select "Automatically refresh fields."
See Also