# Transform a 2 option column into a true / false boolean column

**URL:** <https://community.glideapps.com/t/transform-a-2-option-column-into-a-true-false-boolean-column/22271>\
**Category:** Ask for Help\
**Created:** [February 5, 2021, 7:30am UTC](https://community.glideapps.com/t/transform-a-2-option-column-into-a-true-false-boolean-column/22271 "2021-02-05T07:30:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mihai\_Enache](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mihai_enache/32/20880_2.png) [@Mihai\_Enache](https://community.glideapps.com/u/Mihai_Enache)\
**Post date:** [February 5, 2021, 7:30am UTC](https://community.glideapps.com/t/transform-a-2-option-column-into-a-true-false-boolean-column/22271/1 "2021-02-05T07:30:59Z")

</div>

Hello,

I have multiple columns with 2 / 3 options inside: “yes”, “no” and some of them contain “-” where I don’t yet know if it is a yes or no.

How can I transform these column into boolean ones?

where I have yes =\> true  
where I have “no” or “-” =\> false

Thank you

---

<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 5, 2021, 7:39am UTC](https://community.glideapps.com/t/transform-a-2-option-column-into-a-true-false-boolean-column/22271/2 "2021-02-05T07:39:30Z")

</div>

A simple [if-then-else](https://docs.glideapps.com/all/reference/data-editor/computed-columns/if-then-else) column should do it…

```auto
If X equals yes
  Then true
Else false

```

Although, that’s not actually going to give you a boolean column type. If that is what you want/need, then I doubt that is possible (in Glide).

---

<div class="post-metadata">

**Author:** ![Mihai\_Enache](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mihai_enache/32/20880_2.png) [@Mihai\_Enache](https://community.glideapps.com/u/Mihai_Enache)\
**Post date:** [February 5, 2021, 7:54am UTC](https://community.glideapps.com/t/transform-a-2-option-column-into-a-true-false-boolean-column/22271/3 "2021-02-05T07:54:21Z")

</div>

Hi @Darren_Murphy I need it for a filter inside the app to use it with an On/off switch. I will try like this to see if it works

---

<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 5, 2021, 8:08am UTC](https://community.glideapps.com/t/transform-a-2-option-column-into-a-true-false-boolean-column/22271/4 "2021-02-05T08:08:00Z")

</div>

If that doesn’t work, and the source column is in your Google Sheet, then what you could do is perform the transformation in your Google sheet. Glide will probably then detect the new column as a Boolean. And even if it doesn’t, you should be able to change the column type in Glide.

---

<div class="post-metadata">

**Author:** ![Mihai\_Enache](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mihai_enache/32/20880_2.png) [@Mihai\_Enache](https://community.glideapps.com/u/Mihai_Enache)\
**Post date:** [February 5, 2021, 8:15am UTC](https://community.glideapps.com/t/transform-a-2-option-column-into-a-true-false-boolean-column/22271/5 "2021-02-05T08:15:26Z")

</div>

It worked like you suggested. I created a new column in my google sheet and then I was able to set it up as boolean inside Glide. Thank you @Darren_Murphy

---

<div class="post-metadata">

**Author:** ![NoCodeAndy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nocodeandy/32/62530_2.png) [@NoCodeAndy](https://community.glideapps.com/u/NoCodeAndy)\
**Post date:** [January 17, 2024, 4:53pm UTC](https://community.glideapps.com/t/transform-a-2-option-column-into-a-true-false-boolean-column/22271/6 "2024-01-17T16:53:30Z")

</div>


