Skip to main content
Solved

IF formula always pulling in value, even if the condition is not met


Forum|alt.badge.img+12

Hi!

I'm having such a basic issue and can't figure out what I'm missing. 

I believe this should be a very basic IF statement: IF {field} is not empty, show this stuff. However, I've tried using {field}, {field}!="" and {field}!=BLANK() and even where there is nothing in {field}, text is showing. 

Here's the simplified formula I'm using to figure out what is going on (substituting "the text" for what will really be there):

IF(
{abr formula- all},
"the text"
)
Here you can see that even if {abr formula- all} is blank, "the text" is showing up.
Any help appreciated!

Best answer by Lauren_Briskin1

Okay! I figured this out. I didn't need !=BLANK() or !="", just using IF({field}) is enough, BUT the field it was pulling in had line breaks in it, which i couldn't see in the output. So it was always showing something because there WAS something!

View original
Did this topic help you find an answer to your question?

6 replies

Forum|alt.badge.img+9
  • Inspiring
  • 36 replies
  • February 16, 2023

Your formula as written is basically saying, if the {abr formula- all} field exists (which it does regardless of whether or not it's empty), return "the text".

I believe you want one of these two options:

IF({abr formula- all}=BLANK(),"","the text")
IF
(NOT({abr formula- all}=BLANK()),"the text","") #more complicated but can be useful in certain situations

Forum|alt.badge.img+12
Anna11 wrote:

Your formula as written is basically saying, if the {abr formula- all} field exists (which it does regardless of whether or not it's empty), return "the text".

I believe you want one of these two options:

IF({abr formula- all}=BLANK(),"","the text")
IF
(NOT({abr formula- all}=BLANK()),"the text","") #more complicated but can be useful in certain situations

Hmm.. I haven't had to do that in the past, and my understanding was that if you use IF and {field} it's actually checking for a value there? 


Forum|alt.badge.img+12

Here's an example where it works as I've done it this way (with an extra AND)

 


Forum|alt.badge.img+12


 
It also seems to work sometimes? 
IF(
{abr formula- all}!=BLANK(),
{abr formula- all}
)
 
But if I put "the text" in there, it always shows a value.

 


Forum|alt.badge.img+9
  • Inspiring
  • 36 replies
  • February 16, 2023
Lauren_Briskin1 wrote:


 
It also seems to work sometimes? 
IF(
{abr formula- all}!=BLANK(),
{abr formula- all}
)
 
But if I put "the text" in there, it always shows a value.

 


When you write IF({abr formula- all}!=BLANK(),{abr formula- all}), you're saying if the original field is not blank, infill the new field with the text from the original field. 

 
When you write IF({abr formula- all},"the text")you're saying if the original field exists, infill the new field with "the text". In this formula, you're not evaluating whether or not the original field is populated.

Forum|alt.badge.img+12
  • Author
  • Inspiring
  • 27 replies
  • Answer
  • February 17, 2023

Okay! I figured this out. I didn't need !=BLANK() or !="", just using IF({field}) is enough, BUT the field it was pulling in had line breaks in it, which i couldn't see in the output. So it was always showing something because there WAS something!


Reply