Discussions

 View Only
  • 1.  Concatenate A field based on if a checkbox is checked

    Posted 01-19-2023 11:59
    I'm trying to create a formula based on the following and having no luck.  If you have any suggestions they would be truly appreciated.

    If [New Medical Plan] is not null OR [New Dental Plan] is not null OR [New Vision Plan] is not null Concatenate [Control],[Suffix],[State]

    Thank you

    ------------------------------
    Kathy Benjamin
    ------------------------------


  • 2.  RE: Concatenate A field based on if a checkbox is checked
    Best Answer

    Posted 01-19-2023 12:04
    Sure,
    Can you tell us the field type of these fields?
    [New Medical Plan]
    [New Dental Plan]
    [New Vision Plan] 


    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: Concatenate A field based on if a checkbox is checked

    Posted 01-19-2023 12:11
    Checkboxes

    ------------------------------
    Kathy Benjamin
    ------------------------------



  • 4.  RE: Concatenate A field based on if a checkbox is checked

    Posted 01-19-2023 12:24
    Right, sorry, I guess that was in your headline. 

    I'm a checkbox field is inherently true or false so you can just do this.  

    If([New Medical Plan] OR [New Dental Plan] OR [New Vision Plan],

    List(", ",  [Control],[Suffix],[State]))

    In the code above I am separating those three fields with a comma, and a space. 

    Note that you could also do this if it makes you feel better for readability,  but its not necessary.

    If(
    [New Medical Plan] = true
    OR
    [New Dental Plan] = true
    OR
    [New Vision Plan] = true,
    List(", ",  [Control],[Suffix],[State]))



    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------



  • 5.  RE: Concatenate A field based on if a checkbox is checked

    Posted 01-19-2023 12:33
    Thank you.  Worked perfectly!

    ------------------------------
    Kathy Benjamin
    ------------------------------