Skip to main content
Solved

Testing for non-BLANK returns incorrect result

  • December 29, 2023
  • 5 replies
  • 47 views

Karl_at_Easy_La
Forum|alt.badge.img+15

I just realised this simple formula, on most fields does not work . Test was done on a Single-Line field.

 

IF(test1 != BLANK(), "Not Blank""Blank")
 
This will always return "Not Blank".  A workaround seems to be to do the below:
 
IF(Not(test1 = BLANK()), "Not Blank""Blank")
 
Any idea why this is so? Or is there a simpler work to check for 'Not Blank/Empty'?

Best answer by Sho

In formula fields, I want the formula to be simple, so this is how I do my field checks.

IF({test1}, "Not Blank", "Blank") IF(NOT({test1}), "Blank", "Not Blank")

5 replies

dilipborad
Forum|alt.badge.img+23
  • Brainy
  • December 29, 2023

Hello @Karl_at_Easy_La 

I think this will be a basic formula for it.

IF(Name=BLANK(), "Blank", "Not Blank")

Check the Image as well.

I hope it helps.

👍

 


Forum|alt.badge.img+21
  • Inspiring
  • Answer
  • December 29, 2023

In formula fields, I want the formula to be simple, so this is how I do my field checks.

IF({test1}, "Not Blank", "Blank") IF(NOT({test1}), "Blank", "Not Blank")

Alexey_Gusev
Forum|alt.badge.img+25

You can also do  

IF(Name, 'Not Blank')

the default for third IF parameter is blank value, so it just output nothing when {Name} is empty. For one word field names figure brackets can be omitted.


Karl_at_Easy_La
Forum|alt.badge.img+15

I just realised the issue is with Lookup-type fields that give the most problems.  For those, = Blank() doesn't work as expected.  I'll use one of these proposed solutions, thanks!


Alexey_Gusev
Forum|alt.badge.img+25

I just realised the issue is with Lookup-type fields that give the most problems.  For those, = Blank() doesn't work as expected.  I'll use one of these proposed solutions, thanks!


You can experience problems using other functions with Lookup-type fields. To prevent it, convert array to string by adding empty string. Instead of {Field} use CONCATENATE({Field}) or ""&{Field}