Help

Hide additional characters when no value available

Topic Labels: Formulas
Solved
Jump to Solution
1651 2
cancel
Showing results for 
Search instead for 
Did you mean: 
rossmcleod
4 - Data Explorer
4 - Data Explorer

Hello! I have a formula which builds record names based on the values of other columns:

{Name} & " (with " & {Secondary Name} & ") " & " - " & {Event} & "\n " & {Year} & " | " & {Room}
Result: John (with Jim) - Conference 2020 | Green Room
However if there’s nothing in “Secondary Name” it displays:
John (with ) - Conference 2020 | Green Room

How do I get it to remove the "(with ) " when there’s nothing to fill it with? The secondary names are linked to other records so unfortunately I can’t just add the brackets to the column entry instead of putting them in the formula.

Thanks in advance!

1 Solution

Accepted Solutions
Kamille_Parks
16 - Uranus
16 - Uranus

Revise your formula like the following. What you need is an IF() statement to check if the {Secondary Name} field is filled in:

{Name} & IF({Secondary Name}, " with (" & {Secondary Name} & ")") & " - " & {Event} & "\n " & {Year} & " | " & {Room}

See Solution in Thread

2 Replies 2
Kamille_Parks
16 - Uranus
16 - Uranus

Revise your formula like the following. What you need is an IF() statement to check if the {Secondary Name} field is filled in:

{Name} & IF({Secondary Name}, " with (" & {Secondary Name} & ")") & " - " & {Event} & "\n " & {Year} & " | " & {Room}

rossmcleod
4 - Data Explorer
4 - Data Explorer

Worked perfectly, thanks for your help!