Mar 27, 2019 11:48 AM
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)
Mar 27, 2019 01:06 PM
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’
Mar 27, 2019 02:52 PM
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))
Mar 28, 2019 01:51 AM
If you insist on using != BLANK() as sometimes you may need such comparison, try using !="" instead (2 double quotes with no space in between).
Mar 28, 2019 08:06 AM
Thank you! I’m new to this, so very much appreciate the help. Worked like a charm.