function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
certi_vimalcerti_vimal 

Difference between ISBLANK and ISNULL

Hi,

 

I am trying to apply validation rule for asking users to fill First Name for Contact.

 

I am planning to have ISBLANK formula used. But curious to know, what will happen if ISNULL is used?

 

What exactly signifies ISBLANK and ISNULL formulaes?

 

 

Thanks,

 

Vimal

Best Answer chosen by Admin (Salesforce Developers) 
Steve :-/Steve :-/

ISBLANK

Description: ​​Determines if an expression has a value and returns TRUE if it does not. If it contains a value, this function returns FALSE.
Use:ISBLANK(expression)and replace expression with the expression you want evaluated.
Example:
(IF(ISBLANK(Maint_Amount__c), 0, 1) + ​
 IF(ISBLANK(Services_Amount__c), 0,1) + ​
  IF(ISBLANK(Discount_Percent__c), 0, 1) + ​
   IF(ISBLANK(Amount), 0, 1) +​
    IF(ISBLANK(Timeline__c), 0, 1)) / 5

This formula takes a group of opportunity fields and calculates what percent of them are being used by your sales personnel. This formula field checks five fields to see if they are blank. If so, a zero is counted for that field. A “1” is counted for any field that contains a value and this total is divided by five (the number of fields evaluated). Note that this formula requires you select the Treat blank fields as blanks option under Blank Field Handling while the Advanced Formula subtab is showing.

Tips:
  • 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 ISBLANK function 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 configured to treat blank fields as zeroes.

All Answers

Steve :-/Steve :-/

They're pretty much the same, ISBLANK is newer and is the recommened function

Steve :-/Steve :-/

ISBLANK

Description: ​​Determines if an expression has a value and returns TRUE if it does not. If it contains a value, this function returns FALSE.
Use:ISBLANK(expression)and replace expression with the expression you want evaluated.
Example:
(IF(ISBLANK(Maint_Amount__c), 0, 1) + ​
 IF(ISBLANK(Services_Amount__c), 0,1) + ​
  IF(ISBLANK(Discount_Percent__c), 0, 1) + ​
   IF(ISBLANK(Amount), 0, 1) +​
    IF(ISBLANK(Timeline__c), 0, 1)) / 5

This formula takes a group of opportunity fields and calculates what percent of them are being used by your sales personnel. This formula field checks five fields to see if they are blank. If so, a zero is counted for that field. A “1” is counted for any field that contains a value and this total is divided by five (the number of fields evaluated). Note that this formula requires you select the Treat blank fields as blanks option under Blank Field Handling while the Advanced Formula subtab is showing.

Tips:
  • 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 ISBLANK function 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 configured to treat blank fields as zeroes.
This was selected as the best answer
Shiva Nand 1Shiva Nand 1
(IF(ISBLANK(Maint_Amount__c), 0, 1) +     in  bold "0,1 and +" what it stands for here and what it means.... please explain me sir...