Skip to main content

I understand that {{#blah}} is basically an “if” statement that checks if a field has a value, but for numerical fields a zero value will be counted as blank.  Is there a method to differentiate between a blank and a zero?  

Anyone have any thoughts on this?


You could use a Ui-Only Formula Field to differentiate between a field being zero or blank, e.g. a Checkbox Ui-Only field called “MyFieldIsZero” which returns true only if the value is explicitly zero

IF({{MyField__c}}==0,true,false)

Then in your page, where you were using {{#MyField__c}} you could instead do {{#MyFieldIsZero}}… {{/MyFieldIsZero}}


And how would do that for number fields? I can see you rely on Javascript, meaning that 0==‘’ is true. In this case how do I know whether a field has 0 value or is blank?