Help

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

Topic Labels: Formulas
Solved
Jump to Solution
633 3
cancel
Showing results for 
Search instead for 
Did you mean: 
epicmike2835
5 - Automation Enthusiast
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:

Screenshot 2024-07-17 at 6.33.46 PM.png

 

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

Screenshot 2024-07-17 at 6.36.55 PM.png

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

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!


Justin Ng
Programme Coordinator at Sistema Aotearoa
https://www.sistemaaotearoa.org.nz/

See Solution in Thread

3 Replies 3
epicmike2835
5 - Automation Enthusiast
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.

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!


Justin Ng
Programme Coordinator at Sistema Aotearoa
https://www.sistemaaotearoa.org.nz/
epicmike2835
5 - Automation Enthusiast
5 - Automation Enthusiast

Worked like a charm, thanks!