# How To Toggle Yes/No Values

**URL:** <https://forum.bubble.io/t/how-to-toggle-yes-no-values/367175>\
**Category:** Tips\
**Created:** [April 21, 2025, 10:10am UTC](https://forum.bubble.io/t/how-to-toggle-yes-no-values/367175 "2025-04-21T10:10:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![boston85719](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/boston85719/32/77286_2.png) [@boston85719](https://forum.bubble.io/u/boston85719)\
**Post date:** [April 21, 2025, 10:10am UTC](https://forum.bubble.io/t/how-to-toggle-yes-no-values/367175/1 "2025-04-21T10:10:21Z")

</div>

If you use a custom state as a yes/no value, or use yes/no in other areas that may be tricky to optimize the change of value, one way to effectuate the change for a custom state has been to have two triggers with conditions so that one is when yes, set state to no, and the second trigger is when no, set state to yes. I’ve been doing that for the longest time.

Now, I do this instead.

 ![Screen Shot 2025-04-21 at 5.08.37 PM](https://us1.discourse-cdn.com/bubble/original/3X/c/3/c37f13f51f1b9785b4ce586e7208faa74cdc9b67.png)

One trigger with no condition, and one action to set state with the value equal to the custom state value followed by conditional comparison of ‘is no’…what does this do? It evaluates to a yes/no, so when the current custom state value is no it evaluates to yes and sets the value to yes, and when the current custom state value is yes, it evaluates to no and sets the value to no.

This is essentially a toggle for yes/no values

---

<div class="post-metadata">

**Author:** ![georgecollier](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/georgecollier/32/182327_2.png) [@georgecollier](https://forum.bubble.io/u/georgecollier)\
**Post date:** [April 21, 2025, 10:15am UTC](https://forum.bubble.io/t/how-to-toggle-yes-no-values/367175/2 "2025-04-21T10:15:12Z")

</div>

Bet you kicked yourself when you worked this one out 🤣

---

<div class="post-metadata">

**Author:** ![boston85719](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/boston85719/32/77286_2.png) [@boston85719](https://forum.bubble.io/u/boston85719)\
**Post date:** [April 21, 2025, 10:29am UTC](https://forum.bubble.io/t/how-to-toggle-yes-no-values/367175/3 "2025-04-21T10:29:10Z")

</div>

yeah, enough to make it public knowledge

---

<div class="post-metadata">

**Author:** ![randomanon](https://avatars.discourse-cdn.com/v4/letter/r/8491ac/32.png) [@randomanon](https://forum.bubble.io/u/randomanon)\
**Post date:** [April 21, 2025, 11:10am UTC](https://forum.bubble.io/t/how-to-toggle-yes-no-values/367175/4 "2025-04-21T11:10:44Z")

</div>

We are rediscovering ancient indigenous knowledge. Love to see it.

> [@Toggle Yes/No Custom State](https://forum.bubble.io/t/toggle-yes-no-custom-state/25896/7):
>
> @JonL While your suggestion works, you CAN just toggle the Boolean! See my note a couple of replies above. A Boolean toggle in Bubble is this (posted a couple replies above):
> 
> > [@](#):
> >
> > Agree this would be handy, but to toggle any Boolean (yes/no) just evaluate: BooleanValue is “no” This returns “yes” if the thing is “no”. It returns “no” if the thing is “yes”. So, toggle. (Though I do hate that syntax and would prefer an operator for Booleans like :inverse or :not.)
> 
> So you Set State \> select the custom state that is a yes/no and set it like this:
> 
> ![image](https://us1.discourse-cdn.com/bubble/original/3X/8/f/8faf2fafc04303d233c99ce0ff22174bcef9f6ae.png)
> 
> This flip-flops the state of SomeBoolean from no to yes and vice-versa.

---

<div class="post-metadata">

**Author:** ![boston85719](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/boston85719/32/77286_2.png) [@boston85719](https://forum.bubble.io/u/boston85719)\
**Post date:** [April 21, 2025, 11:21am UTC](https://forum.bubble.io/t/how-to-toggle-yes-no-values/367175/5 "2025-04-21T11:21:08Z")

</div>

Nice find buried in the threads from yesteryear…man how I wish my skill set after 5 months on Bubble from March 2018 to that post from August 2018 was robust enough to have even comprehended what that was about.

---

<div class="post-metadata">

**Author:** ![randomanon](https://avatars.discourse-cdn.com/v4/letter/r/8491ac/32.png) [@randomanon](https://forum.bubble.io/u/randomanon)\
**Post date:** [April 21, 2025, 11:27am UTC](https://forum.bubble.io/t/how-to-toggle-yes-no-values/367175/6 "2025-04-21T11:27:40Z")

</div>

I actually found it out from a random YouTube short when I was first starting to learn Bubble, thank god for the algo.

---

<div class="post-metadata">

**Author:** ![deejay.shani](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/deejay.shani/32/108589_2.png) [@deejay.shani](https://forum.bubble.io/u/deejay.shani)\
**Post date:** [April 21, 2025, 11:30am UTC](https://forum.bubble.io/t/how-to-toggle-yes-no-values/367175/7 "2025-04-21T11:30:45Z")

</div>

I was lucky to learn it in my very early days of learning Bubble. It was a not-very-easy-to-find video by one of the seniors, @keith I guess. It has been a great convenience ever since and something that I use all the time.

---

<div class="post-metadata">

**Author:** ![Benjamin\_Rodgers](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/benjamin_rodgers/32/262755_2.png) [@Benjamin\_Rodgers](https://forum.bubble.io/u/Benjamin_Rodgers)\
**Post date:** [April 21, 2025, 3:32pm UTC](https://forum.bubble.io/t/how-to-toggle-yes-no-values/367175/8 "2025-04-21T15:32:41Z")

</div>

I remember watching keiths [video](https://forum.bubble.io/t/video-working-with-booleans-yes-no-values-in-bubble-are-you-cool-with-boole/37899) explaining booleans 3 years ago and being so confused until it suddenly made complete sense, lol
