+ Start a Discussion

Blank Currency Value not recognized as such within Formula Field

The following formula isn't properly recognizing blank currency fields.


Here's the formula:

Adjustment__c*BLANKVALUE(TieredPrice__c, ListPrice)


Where Adjustment is a percent field, TieredPrice__c is a currency field. When TieredPrice__c is blank, the result of the formula is 0.00. The same applies when i try to use null instead. We can't rely on TieredPrice__c=0 as the condition, because 0.00 is a valid TieredPrice__c sometimes.


Is this a bug? TieredPrice__c isn't a formula field so there's no option to specify whether to treat blanks as null or 0.

Best Answer chosen by Admin (Salesforce Developers) 



I was not expecting the blank handling rule for formulas to be pre-blank/null evaluation. It kinda make those blankvalue() nullvalue() swaps useless...but the solution is


1. if you can't use the 'treat blank values as blank' option - ie if you have other field values that need to be treated as zeros so they don't throw errors,  use an if criterial with ISNULL()

2. or if you can, just use the 'treat blank values as blank' option, and you're golden.