Skip to main content
Solved

Formula Help Needed: Multiple Checkboxes into one text field

  • September 19, 2022
  • 6 replies
  • 96 views

Hello,

I’m looking for help with a formula/script/automation. I have 5 fields that are checkboxes noting a user’s role. Some users have none checked, some have some, or even all. Also, these fields may be updated at any time by the user, so need something that updates automatically (both adding or removing a role).

I need another field that uses the title of the checkbox field (or text I provide), and puts them into one field. I’m struggling with adding commas, because they only need a comma if another role needs to show up behind the prior one.

Best answer by kuovonne

I copied and pasted this, but I cannot get it to work (keep getting an error and cannot save). I’m not familiar with the dollar sign in this context, but wondering if that’s the issue? Any other ideas?

Thank you so much for your help.


I forgot a comma on one line. Try again.

6 replies

Forum|alt.badge.img+16
  • Inspiring
  • September 19, 2022

Hi @Ashley_Eidbo,
Is there a reason that the options are checkboxes?

Why not a multiselect or link to another record. Then you would not need a formula at all.

In any case, post your current formula and I can try to help you remove the commas.


  • Author
  • New Participant
  • September 20, 2022

unfortunately I need to keep the checkboxes for some integrations that run off of it. I do, however, have some formula fields with the correct words showing. Those formulas are: IF({Curricular Lead}=1

,“Curricular Lead”)

The formula in the prior screenshot is coming from those: CONCATENATE({CL for HS},", “,{IL for HS},”, “,{SL for HS},”, “,{IA for HS},”, ",{TC for HS})

I’m assuming I need many IFs for this to work, but everything I try gives me an error.


kuovonne
Forum|alt.badge.img+29
  • Brainy
  • September 20, 2022

unfortunately I need to keep the checkboxes for some integrations that run off of it. I do, however, have some formula fields with the correct words showing. Those formulas are: IF({Curricular Lead}=1

,“Curricular Lead”)

The formula in the prior screenshot is coming from those: CONCATENATE({CL for HS},", “,{IL for HS},”, “,{SL for HS},”, “,{IA for HS},”, ",{TC for HS})

I’m assuming I need many IFs for this to work, but everything I try gives me an error.


REGEX_REPLACE(
  CONCATENATE(
    IF({Curricular Lead, "Curricular Lead, "),
    IF({Implementation Lead},"Implementation Lead, "),
    IF({School Leader},"School Leader, "),
    IF({Inquiry Advocate},"Inquiry Advocate, "),
    IF({Tech Contact}, "Tech Contact, ")
  ),
  ", $",
  ""
)

  • Author
  • New Participant
  • September 20, 2022
REGEX_REPLACE(
  CONCATENATE(
    IF({Curricular Lead, "Curricular Lead, "),
    IF({Implementation Lead},"Implementation Lead, "),
    IF({School Leader},"School Leader, "),
    IF({Inquiry Advocate},"Inquiry Advocate, "),
    IF({Tech Contact}, "Tech Contact, ")
  ),
  ", $",
  ""
)

I copied and pasted this, but I cannot get it to work (keep getting an error and cannot save). I’m not familiar with the dollar sign in this context, but wondering if that’s the issue? Any other ideas?

Thank you so much for your help.


kuovonne
Forum|alt.badge.img+29
  • Brainy
  • Answer
  • September 20, 2022

I copied and pasted this, but I cannot get it to work (keep getting an error and cannot save). I’m not familiar with the dollar sign in this context, but wondering if that’s the issue? Any other ideas?

Thank you so much for your help.


I forgot a comma on one line. Try again.


  • Author
  • New Participant
  • September 20, 2022

I forgot a comma on one line. Try again.


it worked! thank you SO much. have been trying to figure this out for awhile.