Skip to main content

Trying to get 'Full Name', 'Organization' in my primary field. My problem is that sometimes both 'Full Name' and 'Organization' are filled in, and sometimes it's only one or the other. I tried using the following formula, and it worked when one or the other is filled in, but when both are filled in, it doesn't add the comma and space. I'll attach an image so it's clear what I mean.

 

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

 

 

In Airtable, for example, the formula would look like this

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

 


Hi, 

IF(Field1 + Field2, ....         - doesn't work 
there are two ways to check,
IF(AND(Field1,Field2), 'both not empty')  or
IF(Field1, IF(Field2,'both not empty'))

Regarding your formula, part of it is redundant.
Your desired result is

{Full Name} & ", " & {Organization}

when a field (any or both) is empty, nothing changes for side parts.  But delimiter needs only for 2 values, so

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

In Airtable, for example, the formula would look like this

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

 


Tried this and while it inserted the comma when both 'Full Name' and 'Organization' were found, it also inserted the comma and a space before the organization when only the 'Organization' was found.

 


Hi, 

IF(Field1 + Field2, ....         - doesn't work 
there are two ways to check,
IF(AND(Field1,Field2), 'both not empty')  or
IF(Field1, IF(Field2,'both not empty'))

Regarding your formula, part of it is redundant.
Your desired result is

{Full Name} & ", " & {Organization}

when a field (any or both) is empty, nothing changes for side parts.  But delimiter needs only for 2 values, so

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

This, too, like the previous suggestion, inserted the comma when both 'Full Name' and 'Organization' were found—but also inserted the comma and a space before the organization when only the 'Organization' was found.

 


If so, the Full Name may contain spaces.
Please check the formula.


This, too, like the previous suggestion, inserted the comma when both 'Full Name' and 'Organization' were found—but also inserted the comma and a space before the organization when only the 'Organization' was found.

 


I guess your {Full Name} formula is something like {First Name} & " " & {Last Name}, so it is never empty.
You can wrap it all into TRIM(   ) and that will solve the problem.
Or you can trim it in the Customer formula,

I think, that should work OK:

 

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

 





I guess your {Full Name} formula is something like {First Name} & " " & {Last Name}, so it is never empty.
You can wrap it all into TRIM(   ) and that will solve the problem.
Or you can trim it in the Customer formula,

I think, that should work OK:

 

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

 





Hey, thanks! That did the trick!


Reply