# Set default to Switch button

**URL:** <https://community.glideapps.com/t/set-default-to-switch-button/29833>\
**Category:** Ask for Help\
**Created:** [August 1, 2021, 6:41am UTC](https://community.glideapps.com/t/set-default-to-switch-button/29833 "2021-08-01T06:41:15Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![defektim](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/defektim/32/9846_2.png) [@defektim](https://community.glideapps.com/u/defektim)\
**Post date:** [August 1, 2021, 6:41am UTC](https://community.glideapps.com/t/set-default-to-switch-button/29833/1 "2021-08-01T06:41:15Z")

</div>

How can I set the default of the Switch button to be TRUE?

---

<div class="post-metadata">

**Author:** ![Lucas\_Pires](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_pires/32/64863_2.png) [@Lucas\_Pires](https://community.glideapps.com/u/Lucas_Pires)\
**Post date:** [August 1, 2021, 6:43am UTC](https://community.glideapps.com/t/set-default-to-switch-button/29833/2 "2021-08-01T06:43:17Z")

</div>

Good question.

Nowadays this is possible only in forms. But I also wish to be when it’s not in forms

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [August 1, 2021, 6:48am UTC](https://community.glideapps.com/t/set-default-to-switch-button/29833/3 "2021-08-01T06:48:54Z")

</div>

you need to create if-else column to check if your column that holds true/false values is empty… then set to true else (if not empty) set to the value from that column…  
then base your switch on it when you are going to that screen/tab/form/view details… to set value beforehand… that would required a custom action for whatever component you are using to get you there.

---

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [March 17, 2022, 9:16am UTC](https://community.glideapps.com/t/set-default-to-switch-button/29833/4 "2022-03-17T09:16:12Z")

</div>

Hi, to set column for switch/Boolean column, (true/false), is there any condition to set column. For example, should be capital letter or any ?

---

<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:** [March 17, 2022, 10:04am UTC](https://community.glideapps.com/t/set-default-to-switch-button/29833/5 "2022-03-17T10:04:11Z")

</div>

I always use lower case true/false

Actually, I rarely use false. Because when I check the values, I always check for true or not true.

---

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [March 18, 2022, 12:50am UTC](https://community.glideapps.com/t/set-default-to-switch-button/29833/6 "2022-03-18T00:50:42Z")

</div>

Oh… because i have one condition if its fulfill, have to uncheck the Boolean column.

---

<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:** [March 18, 2022, 1:02am UTC](https://community.glideapps.com/t/set-default-to-switch-button/29833/7 "2022-03-18T01:02:23Z")

</div>

Okay.

So you can either set it to `false`, or just do a Clear Value. I prefer to use Clear Value, mostly because when you look at a Boolean column in the Data Editor, it’s basically impossible to tell the difference between `false` and `empty`. So I always set mine to `empty`, and then I never get tripped up.

---

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [March 18, 2022, 1:22am UTC](https://community.glideapps.com/t/set-default-to-switch-button/29833/8 "2022-03-18T01:22:25Z")

</div>

I understand your preferable. But mine, i just put False. Scare the Data editor cannot read the empty one .

---

<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:** [March 18, 2022, 1:25am UTC](https://community.glideapps.com/t/set-default-to-switch-button/29833/9 "2022-03-18T01:25:23Z")

</div>

That’s fine.

> [@biha](#):
>
> Scare the Data editor cannot read the empty one .

That’s why it’s always a good idea to check for `not true` instead of `false`.  
If you do that, you get the same result for `empty` and `false`.

Remember - every boolean column will be `empty` until the first time you set it.

---

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [March 18, 2022, 1:31am UTC](https://community.glideapps.com/t/set-default-to-switch-button/29833/10 "2022-03-18T01:31:05Z")

</div>

> [@Darren\_Murphy](#):
>
> That’s why it’s always a good idea to check for `not true` instead of `false` .

Ok understand. Thank you so much for your valuable explanation.
