# Using Concatenate with Multi-selects Leaving an extra comma...?

Topic Labels: Formulas
Solved
260 3
cancel
Showing results for
Did you mean:
5 - Automation Enthusiast

If I use this formula:

IF({Whole-Body Conditions}!=BLANK(), {Whole-Body Conditions}, "") &
IF({Body: Left Foot}!=BLANK(),
CONCATENATE(", ", {Body: Left Foot}), "")

I get this result when {Body: Left Foot} is NOT empty, WHICH IS WHAT I WANT:

But when {Body: Left Foot} is EMPTY, I get this result that has an extra COMMA:

When I take out the comma in the second IF statement, then there's no commas at all whether or not {Body: Left Foot} is empty.

So... what's up with that? Shouldn't it ONLY put the comma IF there's content in {Body: Left Foot}?

1 Solution

Accepted Solutions
9 - Sun

Hmm not sure either. Try a formula like this:

`{Whole-Body Conditions} &IF(NOT(   {Body: Left Foot}=""),   ", ") & {Body: Left Foot}`

Not sure if this is what you're looking for, but let me know!

3 Replies 3
5 - Automation Enthusiast

It appears that it is caused by the referenced Multi-select field {Body: Left Foot} but I'm still not sure how that's possible if that field is blank it still produces a comma.

9 - Sun

Hmm not sure either. Try a formula like this:

`{Whole-Body Conditions} &IF(NOT(   {Body: Left Foot}=""),   ", ") & {Body: Left Foot}`

Not sure if this is what you're looking for, but let me know!

5 - Automation Enthusiast

Worked like a charm, thanks!