How To Create Formula Fields


A Formula Field is a virtual data type that does not exist as a physical field on the database and as such, does not persists. The value of the field is generated dynamically whenever operations need to access it such as UI rendering, reports, workflows, workflow actions, and API retrieve.

Since the value is generated dynamically, the field also have the following behaviors:

  1. The field cannot be assigned a value when creating or updating an entity record via the UI.
  2. When dealing with manipulation of records via API, updates, inserts and upserts cannot be done. Retrieve however, can be done.


Step 1. Select the Correct Entity

Select the entity where the field will be created in by going to Setup > Develop > Entities and then select the desired entity.

Then, click the Fields child node on the left navigation pane.

Click the New button to continue. The New field wizard page is displayed.

Step 2. Complete the Form.

The form will be similar to the example below. Fill up the required fields accordingly and select FORMULA as the Data Type. This will then expose the Formula Value text entry field where you can add reference fields and use the BillingPlatform formula language to build the value that is needed.

The formula building buttons can be used to add fields, operators, functions, as well as validate the syntax of the entered formula. For example, if you need to concatenate the values of two text fields named AccountText1 and AccountText2 with a space inbetween, the following formula can be used:

{!AccountObj.AccountText1} || ' ' || {!AccountObj.AccountText2}

The {...} parameters are entity fields, while || is the concatenation operator. Lastly, ' ' is a simple white space enclosed in single quotes.

The rest of the fields can be populated as you would any other fields. Refer to the field description table below for details:

Field Description
Field Name Enter a system name for the field. This name must only contain XML valid characters.
Display Label Enter a UI friendly label that will be shown on the form.
Description Enter a description for the new field.
Status Determine if the field will be Active or Deactivated.
Data Type Select  the data type of the new field.
Display After Select the field in which to place the new field after it.
Display Mode Select the conditions when the field is displayed. Choices are on record creation, on edit, and on details view.
Role Permissions Use the table to set what users and see or interact with the new field.
Cascading Field Rules use the table to set conditions on when the field is read-only, editable, hidden, etc.
Help System Complete the field to allow the help icon to display and show your help text.

Step 3. Save The Field.

Click the Submit button to save the new field.

 Related Topics

Have more questions? Submit a request


Powered by Zendesk