What is the difference between ISNULL() and ISBLANK()?
As an admin, Formulas can be a little confusing sometimes. Especially when there are two functions which appear to be very similar / do the same thing.
From the out set, the difference between these two functions can actually appear very slight.
But not all is as it appears, and sometimes the difference between them is actually what you want to test/validate…
What is: ISNULL()
From a computing perspective (which Salesforce adheres to), something could be NULL because it doesn’t exist or hasn’t been created/setup (in developer speak, you might say ‘instantiated’).
Ultimately, this means NULL is the absence of a value all together.
The ISNULL() function will return a TRUE or a FALSE value, which you can then use in validation rules, workflows, formulas, etc.
What does this mean in real world?
In Salesforce, if you had a date field, with no value in it. Salesforce would return TRUE.
However, if you had a text field ISNULL() would always return a false value, even if there was no text in the field. This is because Salesforce stores an empty value in text, even if there is nothing in the field – which leads us to…
What is: ISEMPTY()
Like the above function, you get a boolean (TRUE/FALSE) output.
However ISEMPTY() goes a step further than ISNULL() and by adding support for text fields (like the example above).
When is a field is ‘not empty’?
If it contains a character, blank space, or a zero. (ie ISEMPTY() = FALSE)
And now text field which is contains no text, will now return ISEMPTY() = TRUE. Along with other fields, like dates or numbers.