Print this page

Field Update Formulas With Blank Number Fields Produce Blank Formulas

Knowledge Article Number 000204547
Description When referencing a formula for a field update that does a mathematical calculation within the formula, if any of the fields are blank the resulting field update is a blank value. 

For Example: 

Field Update to Custom_Number_Field__c
Formula:

Custom_Number_Field_1__c + Custom_Number_Field_2__c + Custom_Number_Field_3__c

If any of the fields in the above formula are blank for a particular record the resulting field update will be a blank value. The cause of this is behavior is because Field Update formulas do not have the option to select "Treat Blanks as Zeros". 
Resolution The resolution to this behavior is to modify the formula to account for potentially blank values and to treat those blank values as zeros. The below example formula syntax can be used to accomplish this.

Old Example: 

Custom_Number_Field_1__c + Custom_Number_Field_2__c + Custom_Number_Field_3__c


Should become:


IF(ISBLANK(Custom_Number_Field_1__c),0, Custom_Number_Field_1__c) 
IF(ISBLANK(Custom_Number_Field_2__c),0, Custom_Number_Field_2__c) 
IF(ISBLANK(Custom_Number_Field_3__c),0, Custom_Number_Field_3__c) 




promote demote