Loading

How Blank Field Handling Works for Salesforce Formula Fields

Fecha de publicación: Jun 1, 2026
Descripción

When building custom formula fields in Salesforce, the Blank Field Handling section controls how your formula behaves when referenced number, currency, or percent fields contain no value (null). Understanding this setting prevents formulas from returning unexpected blank results.
For custom formula fields, the Blank Field Handling section is accessible in Lightning Experience via Setup > Object Manager > [Object] > Fields & Relationships. Click Edit on the formula field and select the Advanced tab.
The Blank Field Handling option applies when your formula references any number, currency, or percent field. The Advanced tab displays two options:

  • Treat blank fields as zeroes — blank referenced fields are calculated as the value 0
  • Treat blank fields as blanks — the formula returns blank if any referenced field is blank
Solución

Scenario: Formula Displaying Blank Values

One possible scenario where Blank Field Handling may be configured incorrectly is when a formula field displays a blank value when you expect it to calculate a result.
Example:
You have two custom fields: Percentage A and Percentage B. You create a formula field that calculates the difference: Percentage_A__c - Percentage_B__c. For a specific record, Percentage A has a value of 1.0 and Percentage B is blank (null).

Outcomes Based on Blank Field Handling Selection

The result of the formula differs based on your Blank Field Handling selection:

  • Outcome 1 — Treat blank fields as zeroes selected: The formula calculates 1.0 - 0 = 1.0. The field displays 1.0 on the record.
  • Outcome 2 — Treat blank fields as blanks selected: Salesforce treats the blank Percentage B field as a null value. Because part of the formula criteria references null, Salesforce does not produce a result. The field displays nothing on the record.

To avoid blank formula results, it is recommended to select Treat blank fields as zeroes to always display a value, unless your business requirements specifically require blank output when referenced fields are empty.

Número del artículo de conocimiento

000381641

 
Cargando
Salesforce Help | Article