Activity Forums Salesforce® Discussions How ISBLANK() is different from ISNULL() in Salesforce?

  • NAVEEN

    Member
    September 20, 2016 at 5:41 am

    ISBLANK() - return true if "TEXT filed" is empty

    ISNULL() - return true if "Number filed" is empty

  • Mohit

    Member
    September 20, 2016 at 6:02 am

    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.

  • Parul

    Member
    September 19, 2018 at 5:22 pm

    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.

Popular Salesforce Blogs

Popular Salesforce Videos