Create formula text if multi-select text field contains a selection

  • 3
  • 3
  • Question
  • Updated 2 years ago
  • Answered
I have a multi-select text field that I want to display the selections of that field in a different form field.  As it stands it doesn't display all of them, just the first one that satisfies the criteria.

here's what I have written:

If(Contains(ToText([Equipment:]), "TENS Unit, Back Brace")= true, "TENS Unit, LSO Back Brace",
Contains(ToText([Equipment:]), "TENS Unit")= true, "TENS Unit",
Contains(ToText([Equipment:]), "Knee Brace")= true, "Knee Brace",
Contains(ToText([Equipment:]), "Secondary Knee Brace")= true, "Secondary Knee Brace",
Contains(ToText([Equipment:]), "Back Brace")= true, "LSO Back Brace","")
Photo of Tony

Tony

  • 194 Points 100 badge 2x thumb

Posted 2 years ago

  • 3
  • 3
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,330 Points 50k badge 2x thumb
try this

List(", ",

If(Contains(ToText([Equipment:]), "TENS Unit, Back Brace"), "TENS Unit, LSO Back Brace"),


IF(Contains(ToText([Equipment:]), "TENS Unit"), "TENS Unit"),
IF(Contains(ToText([Equipment:]), "Knee Brace"), "Knee Brace"),
IF(Contains(ToText([Equipment:]), "Secondary Knee Brace"), "Secondary Knee Brace"),
IF(Contains(ToText([Equipment:]), "Back Brace"), "LSO Back Brace"))
Photo of Tony

Tony

  • 194 Points 100 badge 2x thumb
Mark, I don't know you but I think you've just become my best friend.  Thank you!
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,330 Points 50k badge 2x thumb
:)
Photo of JRogerson

JRogerson

  • 450 Points 250 badge 2x thumb
Hey Mark, I just wanted to send a note to say that once again you came to my rescue (although you don't know it)  Working with a multi-text field, I was trying to apply it to a formula and then I found this example above, and BOOM, able to adapt it to my need and it works like a charm.  Jeff