Skip to main content

I've spent a fair bit of time looking and IF, AND, OR, SWITCH formulas but can't seem to figure this out for making three different options using two fields with the correct punctuation.

I have two fields, {Full Name} and {Organization}.

If there is just a name, I want 'Full Name'

If there is just an organization, I want 'Organization'

If there is both a name and organization, I want 'Full Name (Organization)'

 

 
This is the least complicated of all the attempts made which seems to work, but I can't figure out how to get the brackets to behave.
IF({Full Name}=TRUE(),{Full Name},(IF({Full Name}=FALSE(),{Organization Name},{Full Name}&" ("&{Organization Name})))&")"
 
And a screenshot of what it looks like. The only one that is correct it the Name (Organization).
 
 
Thanks in advance!

Try this:

IF(
AND(
{Full Name},
Organization
),
{Full Name} & " (" & Organization & ")",
IF(
{Full Name},
{Full Name},
Organization
)
)

Resulting in this:


IF(Organization,
IF({Full Name},
{Full Name}&' ('&Organization&')',
Organization),
{Full Name})

Hi all, thanks for the help.

For both of those formulas, I'm getting brackets around both 'organization' and 'full name (organization', and an error that says missing opening parenthesis...?

  

 


Hi all, thanks for the help.

For both of those formulas, I'm getting brackets around both 'organization' and 'full name (organization', and an error that says missing opening parenthesis...?

  

 


That's because your field name is {Organization Name}, not Organization. (if field name contains space, it must be in brackets). I suppose you put wrong name in description, but your formula contains correct name.

So,

 

IF({Organization Name},
IF({Full Name},
{Full Name}&' ('&{Organization Name}&')',
{Organization Name}),
{Full Name})

 

 

That's because your field name is {Organization Name}, not Organization. (if field name contains space, it must be in brackets). I suppose you put wrong name in description, but your formula contains correct name.

So,

 

IF({Organization Name},
IF({Full Name},
{Full Name}&' ('&{Organization Name}&')',
{Organization Name}),
{Full Name})

 

 

Hmmm, I changed the fields to be Organization Name and Full Name to match your example and copy/pasted your formula but I'm getting the same errors for some reason....


Hmmm, I changed the fields to be Organization Name and Full Name to match your example and copy/pasted your formula but I'm getting the same errors for some reason....


I have the same warnings, but when I press Save, it's ok, and it works good.
On different projects I'm using complex and composed formulas and ... in short, linter often lies 🙂
So I just ignore these warnings if formula works as expected. Did you try to just press Save? If something really wrong with syntax, it won't let you   😀

 


I have the same warnings, but when I press Save, it's ok, and it works good.
On different projects I'm using complex and composed formulas and ... in short, linter often lies 🙂
So I just ignore these warnings if formula works as expected. Did you try to just press Save? If something really wrong with syntax, it won't let you   😀

 


@Alexey_Gusev it accepts the formula for sure. And the formula works for Name (Organization) and Full Name, but I'm still getting ( ) around my Organization when it is the only item.   

 

 

 


Try this:

IF(AND({Full Name}, Organization), {Full Name}&" ("&Organization&")", {Full Name}&Organization)


Try this:

IF(AND({Full Name}, Organization), {Full Name}&" ("&Organization&")", {Full Name}&Organization)


Still getting the same result for some reason. 

 


Is it possible that there are spaces in your Full Name field? Because that is one thing that would cause that behavior.....


Is it possible that there are spaces in your Full Name field? Because that is one thing that would cause that behavior.....


Yes! My Full Name field is a formula and was generating a space. Thanks much!!


Reply