Data Masking Using Action – Formula Field

Updated on March 9, 2023

Data Masker supports the action ‘Formula Field’ which replaces the field value with the value returned by the Formula Field.

There are several data types that support Formula Field return types like Checkbox, Currency, Date, Number, Percent, Text, and Time.

Pre-requisites: 

Initially, Formula Field action is hidden from the Field Mapping Layout, so the user needs to unhide this from the Setup.

To unhide the Formula Field follow the below steps –

Solution Steps – 

Step 1: i. Go to Object Manager

             Ii.  Search for an object ‘Field Masking’

             Iii. Click on the Field ‘Further Action’ from the object ‘Field Masking’

             iv. Scroll Down to the Inactive Values section

 v.   Click on the  ‘Activate’ 

  • After completing Step 1, the User needs to complete Step 2 to include the ‘Formula Field’ action in the Field Masking component.

Step 2:  i. Go to Object Manager

             Ii.  Search for object ‘Field Masking’

             Iii. Click on the Field ‘Further Action’ from the object ‘Field Masking’

             iv. Scroll Down to the ‘Picklist Options’ section

v.  Click on the link ‘Change’ next to the Controlling Field 

vi. After Clicking on the ‘Change’ user will be redirected to the ‘Edit Field Dependency’ page. 

     Click on the Formula Field 

  • Click on the ‘Include Values’
  • Now Formula Field action is ready to use.
  • To mask the records with the help of Formula Field action, user needs to enter the API name of the respective Formula Field in the Replacing Value section.

Note – While adding a field for masking with the formula field, the user needs to make sure Formula Field with respective return type is created.

Eg. If the user is adding Number Field in the field masking then Formula Field with a Number return type should be created for that particular object.

  • Click on the Save button and execute the Data Masking 
  • After masking, users can check that field values will be replaced by the value returned by the Formula Field.
  • Likewise, users can perform masking by Formula Field action as per the business requirement.

Note – There may be some variations in the value for Data type ‘Date/Time from the value returned by the Formula Field for it.