Skip to main content

Trouble with !=BLANK()

  • March 27, 2019
  • 4 replies
  • 30 views

Forum|alt.badge.img+8

So I am trying to create a formula that would help me out w/ some grammar issues in my Page Designer.

Basically, if there is a contact in the secondary contact field named Gina Malone, I want the function to populate as “and Gina.” If the secondary contact field is blank I want the function field to remain blank. The below function does a great job of producing what I need when there is a contact in the secondary contact field, but always populates as “and” when secondary contact is blank.

IF({Secondary Contact}!=BLANK(), "and “) & LEFT({Secondary Contact}, SEARCH(” ", {Secondary Contact})-1)

4 replies

Forum|alt.badge.img+4
  • Participating Frequently
  • March 27, 2019

basically, you want IF({Secondary Contact}, "and “{Secondary Contact}, “”)

I’m ignoring the first name extraction for the moment. If you enter just a field reference, then it will evaluate it for ‘blank or not blank’


Justin_Barrett
Forum|alt.badge.img+21

Mike’s suggestion is mostly on point, but it has a syntax issue. Here’s the correction wrapped into (and correcting a separate issue with) your original formula:

IF({Secondary Contact}, "and " & LEFT({Secondary Contact},
    SEARCH(" ", {Secondary Contact})-1))

Forum|alt.badge.img+2
  • Participating Frequently
  • March 28, 2019

If you insist on using != BLANK() as sometimes you may need such comparison, try using !="" instead (2 double quotes with no space in between).


Forum|alt.badge.img+8
  • Author
  • Known Participant
  • March 28, 2019

Mike’s suggestion is mostly on point, but it has a syntax issue. Here’s the correction wrapped into (and correcting a separate issue with) your original formula:

IF({Secondary Contact}, "and " & LEFT({Secondary Contact},
    SEARCH(" ", {Secondary Contact})-1))

Thank you! I’m new to this, so very much appreciate the help. Worked like a charm.