# Problem applying conditional to Boolean field

**URL:** <https://community.glideapps.com/t/problem-applying-conditional-to-boolean-field/57896>\
**Category:** Ask for Help\
**Created:** [February 13, 2023, 7:39pm UTC](https://community.glideapps.com/t/problem-applying-conditional-to-boolean-field/57896 "2023-02-13T19:39:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mberns01](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mberns01/32/51549_2.png) [@mberns01](https://community.glideapps.com/u/mberns01)\
**Post date:** [February 13, 2023, 7:39pm UTC](https://community.glideapps.com/t/problem-applying-conditional-to-boolean-field/57896/1 "2023-02-13T19:39:55Z")

</div>

Button A changes a boolean field from “not selected” to “selected”.  
I want Button A to only be visible if the boolean field is “not selected”.

Button B changes the same boolean field from “selected” to “not selected”  
I want Button B to only be visible if the boolean field is “selected”

I set the conditional for Button A to visible “when boolean field is False”  
and  
I set the conditional for Button B to visible “when boolean field is True”

However, Button A does not satisfy the condition by default. It only displays if I change its visibility conditional to “when boolean field is empty”.

Then when I select it Button A disappears and Button B appears.

Then I select Button B which changes the Boolean to “False” causing Button B to disappear.

However, it does not cause Button A to re-appear again because (as you recall) the visibility condition on Button A is “when boolean field is emtpy”, which it is not. It is “False”.

How do i get Button A to display by default (when the boolean field is empty) AND also display when the boolean goes from “True” to “False”.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [February 13, 2023, 9:37pm UTC](https://community.glideapps.com/t/problem-applying-conditional-to-boolean-field/57896/2 "2023-02-13T21:37:33Z")

</div>

Don’t ever check for False in a condition, because you will fall into this trap. Booleans can have 3 states. Blank, False, and True. Normally once a boolean is checked and then unchecked, only then will it becomes False.

Instead only check for Checked or Not Checked, or as an alternative, you can check for True or Not True. But never check for False.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [February 14, 2023, 1:12am UTC](https://community.glideapps.com/t/problem-applying-conditional-to-boolean-field/57896/3 "2023-02-14T01:12:09Z")

</div>

> [@Jeff\_Hager](#):
>
> But never check for False.

…unless you actually care about the difference between false and null 😉

---

<div class="post-metadata">

**Author:** ![mberns01](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mberns01/32/51549_2.png) [@mberns01](https://community.glideapps.com/u/mberns01)\
**Post date:** [February 14, 2023, 7:49pm UTC](https://community.glideapps.com/t/problem-applying-conditional-to-boolean-field/57896/4 "2023-02-14T19:49:11Z")

</div>

Thank you very much!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [February 15, 2023, 7:50pm UTC](https://community.glideapps.com/t/problem-applying-conditional-to-boolean-field/57896/5 "2023-02-15T19:50:12Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
