Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Nov 12, 2022 12:18 PM
I would like to omit the semi-colon when a field is blank, and I know it can be done using IF, however my brain cannot wrap around how to pull it together! Can anyone help?
Here’s my example:
The current Formula I am using:
Much appreciated :slightly_smiling_face:
Nov 12, 2022 12:37 PM
There are several possible formulas. Here is one that assumes that you will always havve a {Manufacturer}
CONCATENATE(
{Manufacturer},
IF({Product}, "; " & {Product}),
IF({Operating System}, "; " & {Operating System}),
IF({Material}, "; " & {Material}),
IF({Colour}, "; " & {Colour}),
IF({Other Details}, "; " & {Other Details})
)
Nov 12, 2022 01:20 PM
Thank you! I won’t always have a manufacturer, but I tried your formula and I’m not sure what I am doing wrong:
Nov 12, 2022 01:48 PM
Is the problem that the formula won’t save, or is the problem that the formula gives the wrong result?
Is there a reason why the line breaks in the formula were removed?
Nov 12, 2022 01:57 PM
So, I got it to work after retyping it several times! Must have been doing something weird. But I am not able to omit the first ; if Manufacturer is empty.
Nov 12, 2022 06:05 PM
REGEX_REPLACE(
CONCATENATE(
IF({Manufacturer}, {Manufacturer} & "; "),
IF({Product}, {Product} & "; "),
IF({Operating System}, {Operating System} & "; "),
IF({Material}, {Material} & "; "),
IF({Colour}, {Colour} & "; "),
IF({Other Details}, {Other Details})
),
"; $",
""
)
Nov 14, 2022 02:37 PM
You are a genius! Thank you