Activity › Forums › Salesforce® Discussions › How ISBLANK() is different from ISNULL() in Salesforce?
Tagged: Difference, Field Type, Field Value, ISBLANK, ISNULL, Salesforce Fields, Salesforce formulas, Salesforce Function
-
How ISBLANK() is different from ISNULL() in Salesforce?
Posted by PRANAV on September 19, 2016 at 12:58 PMHi All,
How ISBLANK Salesforce function is different from ISNULL Salesforce function?
ISBLANK() vs ISNULL()?
Thanks
Parul replied 7 years, 8 months ago 4 Members · 3 Replies -
3 Replies
-
ISBLANK() – return true if “TEXT filed” is empty
ISNULL() – return true if “Number filed” is empty
- [adinserter block='9']
-
Hi Pranav,
It is preferred to use the ISBLANK Salesforce function instead of ISNULL Salesforce function in new Formulas. ISBLANK() has the same functionality as ISNULL(), but also supports text fields. Salesforce will continue to support ISNULL, so you do not need to change any existing formulas.
ISNULL():
Text fields are never null, so using ISNULL() with a text field always returns false. Empty date and date/time fields always return true when referenced in ISNULL() functions.
ISBLANK():
If you use ISBLANK() with a numeric field, the function only returns TRUE if the field has no value and is not configured to treat blank fields as zeroes.
For example, the formula field IF(ISNULL(new__c) 1, 0) is always zero regardless of the value in the New field. For text fields, use the ISBLANK Salesforce function instead.
-
Hi
Adding some points
Use ISBLANK instead of ISNULL in new formulas. ISBLANK has the same functionality as ISNULL, but also supports text fields. Salesforce will continue to support ISNULL, so you do not need to change any existing formulas.
A field is not empty if it contains a character, blank space, or zero. For example, a field that contains a space inserted with the spacebar is not empty.
Use the BLANKVALUE function to return a specified string if the field does not have a value; use the ISBLANKfunction if you only want to check if the field has a value.
If you use this function with a numeric field, the function only returns TRUE if the field has no value and is not.Thanks
Log In to reply.