Concatenate Multiselect & Checkbox fields in a formula field w/ a conditional comma.

Concatenate Multiselect & Checkbox fields in a formula field w/ a conditional comma.

I want to combine the selected choices of a multi-select (dropdown) field and a checkbox field with a comma between the two within a formula field. However, one of these fields might sometimes be empty, so Multiselect +", " +Checkbox would leave me w/ an unwanted comma. How can I have a conditional comma, basically?

One thing I tried was to add a text field that the checkbox field would pass it's data to and add a comma to it. I tried on user-input: if(checkbox != null) input.Textfield="," + input.checkbox; Then in the formula field I simply have Multiselect+Textfield. This basically works for me but there is a weird quirk I just don't understand. When the checkboxes are checked, the selections appear in the Textfield and are passed into the formula along w/ the Multiselect, just as I want. But if the checkboxes are then UNchecked (after being checkd once), the selections are cleared from the Textfield (and the formula) but the comma doesn't go away! The comma is there for good! What is going on here??