A formula field is a numeric field that stores a value that has been calculated using rules. To create a formula field, you must:
Select the Formula Field check box.
Define rules for the field to specify how the field value should be calculated.
Formula fields differ from non-formula fields in two ways:
Rather than having a base class of EntityFieldCustomization or RelationshipFieldCustomization, they have a base class of CalculatedEntityFieldCustomization (for entity family fields) or CalculatedRelationshipFieldCustomization (for relationship family fields).
They contain Formula rules.
Note: Formula rules must be defined manually in the Visual Studio.
When creating a formula field, you should select the Formula Field check box and save it before creating any rules. This will cause the field's code item to be set up as a formula field. If other rules already exist for a non-formula field and you want to change the field to a formula field, perform the following steps:
Select the Formula Field check box and save the field.
For entity fields, manually change the base class on the field's code item from EntityFieldCustomization to CalculatedEntityFieldCustomization.
For relationship fields, manually change the base class on the field's code item from RelationshipFieldCustomization to CalculatedRelationshipFieldCustomization.
Note: If you modify the formula for an existing formula field or define a new calculation for a field that was previously not a formula field, the value for that field will not be updated automatically in existing records. The new calculated value will be displayed in formatted query results and in Record Manager. The value stored in the database, however, will not be updated until the records are re-saved. Unformatted queries will display the value that is stored in the database.
Copyright © 2018 General Electric Company. All rights reserved.