Skip to main content

Using formula fields

You can use formula fields to manipulate Salesforce data and perform some basic validations and calculations on the basis of protected fields storing regulated data. These fields allow you to create simple and complex formulas based on PII data from a record and from its related records.

To use formula fields with protected fields on a Salesforce object (for example, Account), please do the following:

  1. From Setup, select Object Manager.

  2. Select Account.

  3. Within the Account object, click Fields & Relationships then click New.

  4. Select the Formula data type.

  5. Click Next.

  6. Fill out the the Field Label and Field Name fields.

  7. Select Formula Return Type (for example Text).

  8. Click Next.

  9. Enter a formula (for example “Name & ', ' & Phone & ', Created at: ' & TEXT(DATETIMEVALUE(CreatedDate))” )

  10. Click Check Syntax.

  11. Click Next two times.

  12. Click Save.

Creating the Object Relationship fields


The following instructions explain how to create the Object Relationship field for the Account object. The same flow can be used for other Salesforce with minor changes in the configuration.

  1. Click the App Launcher icon.

  2. Select the Object Relationship fields list view.

  3. Click the New button.

  4. Fill out the following fields:

    • Object name: Account
    • Field name: Formula_field__c
    • Formula: Enter the formula created before Name & ', ' & Phone & ', Created at: ' & TEXT(DATETIMEVALUE(CreatedDate))
  5. Click Save.

  6. Go to the record of the Account type and make sure the formula field is created: