Discussions

 View Only
Expand all | Collapse all

Rule If Checkbox1 is Checked then Uncheck Checkbox 2 not Working

  • 1.  Rule If Checkbox1 is Checked then Uncheck Checkbox 2 not Working

    Posted 04-21-2022 12:25
    Edited by Hunter B 11-22-2023 09:41

    Hello,
    I have two rules setup that say if checkbox1 is checked then uncheck checkbox2 and the other rule is if checkbox2 is checked then uncheck checkbox1. The first rule works but the second one does not. I am trying to make it so users cannot check both boxes, it's either one or the other but they can also have both unchecked if they want too.


    ------------------------------



  • 2.  RE: Rule If Checkbox1 is Checked then Uncheck Checkbox 2 not Working

    Posted 04-21-2022 12:26
    Try unchecking the box at the bottom of the form rule, so that the rule fires "all the time".

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: Rule If Checkbox1 is Checked then Uncheck Checkbox 2 not Working

    Posted 04-21-2022 12:32
    Edited by Hunter B 11-22-2023 09:41

    Hi Mark,
    I should have mentioned that I do have the box unchecked for both rules.

    ------------------------------

    ------------------------------



  • 4.  RE: Rule If Checkbox1 is Checked then Uncheck Checkbox 2 not Working

    Posted 04-21-2022 13:09
    Edited by Hunter B 11-22-2023 09:42

    Hi Mark,
    I should have mentioned that I do have that box unchecked for both rules.

    ------------------------------

    ------------------------------



  • 5.  RE: Rule If Checkbox1 is Checked then Uncheck Checkbox 2 not Working

    Posted 04-21-2022 13:47
    I think I had this same problem and couldn't solve. It will probably work in one direction, but not both. The problem, I believe, is that when you try to click the second checkbox, they are momentarily both checked, and the first rule in the dynamic rules forms and keeps unchecking the same box.

    ------------------------------
    Mike Tamoush
    ------------------------------



  • 6.  RE: Rule If Checkbox1 is Checked then Uncheck Checkbox 2 not Working
    Best Answer

    Posted 04-21-2022 16:41
    After some testing, I agree with Mike.

    You may need to have a radio button instead and if you like the look of the checkboxes, then make them to be formulas based on the radio button (multiple choice) field.

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------



  • 7.  RE: Rule If Checkbox1 is Checked then Uncheck Checkbox 2 not Working

    Posted 04-21-2022 17:10
    I may have gotten it to work by leaving the box checked so the rules DONT fire all the time. Meaning only when there is a change. I haven't tested in a while and cant remember if I finally got it to work. Either way, I ended up abandoning the entire try and going in a different direction, but in my head it should work if it only fires when it is changed?

    ------------------------------
    Mike Tamoush
    ------------------------------



  • 8.  RE: Rule If Checkbox1 is Checked then Uncheck Checkbox 2 not Working

    Posted 04-21-2022 17:16
    I tried on tracking the checkboxes and also check in the checkboxes I don't think either one works

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------



  • 9.  RE: Rule If Checkbox1 is Checked then Uncheck Checkbox 2 not Working

    Posted 04-21-2022 17:22
    Edited by Hunter B 11-22-2023 09:42

    You would be correct both ways don't work how we would ideally want it to but we just ended up adding a note to the from notifying the user only one box can be checked at a time, thanks!

    ------------------------------

    ------------------------------



  • 10.  RE: Rule If Checkbox1 is Checked then Uncheck Checkbox 2 not Working

    Posted 04-21-2022 17:20
    Edited by Hunter B 11-22-2023 09:43

    Leaving it checked so they don't fire all the time kind of works but after checking the boxes a few times it stopped unchecking the other one and allowed me to check both boxes.  How I had it before was okay, we just added a note to the form to make it clear that only one box can be checked. Thanks for the help!

    ------------------------------

    ------------------------------



  • 11.  RE: Rule If Checkbox1 is Checked then Uncheck Checkbox 2 not Working

    Posted 04-21-2022 17:22

    So a workable solution is to have a form rule which says that if both boxes are checked then aboard the save and put up a message. That way you will get the behavior you want in most cases but you have a safety net that they won't be able to save the record if they happen to get both of them checked.


    You can also have a formula field which will show a red color  message saying only choose one checkbox. That way you don't have to have a permanent message on the form telling them just to choose one, they will only see the message if they choose more than one. 



    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------



  • 12.  RE: Rule If Checkbox1 is Checked then Uncheck Checkbox 2 not Working

    Posted 04-21-2022 17:28
    Edited by Hunter B 11-22-2023 09:42

    Mark,
    I like the idea of the red message, I am still pretty new to Quickbase, what would that formula look like?

    ------------------------------

    ------------------------------



  • 13.  RE: Rule If Checkbox1 is Checked then Uncheck Checkbox 2 not Working

    Posted 04-21-2022 21:11
    sure ... Formula Rich Text field.

    IF([checkbox 1] and  [checkbox 2],
    "<font color=red>Please only choose either Checkbox 1 or Checkbox 2!")


    // or this would be larger and bold.


    IF([checkbox 1] and  [checkbox 2],
    "<font color=red><b><font size=+1>Please only choose either Checkbox 1 or Checkbox 2!")

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------