# Can we toggle boolean items using custom actions?

**URL:** <https://community.glideapps.com/t/can-we-toggle-boolean-items-using-custom-actions/22378>\
**Category:** Ask for Help\
**Created:** [February 7, 2021, 6:44pm UTC](https://community.glideapps.com/t/can-we-toggle-boolean-items-using-custom-actions/22378 "2021-02-07T18:44:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tyler\_Scheviak](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tyler_scheviak/32/11811_2.png) [@Tyler\_Scheviak](https://community.glideapps.com/u/Tyler_Scheviak)\
**Post date:** [February 7, 2021, 6:44pm UTC](https://community.glideapps.com/t/can-we-toggle-boolean-items-using-custom-actions/22378/1 "2021-02-07T18:44:49Z")

</div>

I am using an inline list to have a huge number of filters for my app. Currently, the user has to click on a list item to then press a button to toggle their filter.

With custom actions, can we toggle a boolean cell?

I know that we can increment and set, but that requires some extra columns that I would like to avoid

---

<div class="post-metadata">

**Author:** ![Travis](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/travis/32/4339_2.png) [@Travis](https://community.glideapps.com/u/Travis)\
**Post date:** [February 7, 2021, 6:53pm UTC](https://community.glideapps.com/t/can-we-toggle-boolean-items-using-custom-actions/22378/2 "2021-02-07T18:53:06Z")

</div>

You can create a new action when they click on the item.

If x is not 1:

- View Details
- Increment x by 1

If x is 1:

- View Details
- Increment x by -1

x would your Boolean column. This would effectively toggle the boolean as you view the column. You would have to make x a user-specific column for this to work.

---

<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 7, 2021, 8:26pm UTC](https://community.glideapps.com/t/can-we-toggle-boolean-items-using-custom-actions/22378/3 "2021-02-07T20:26:21Z")

</div>

A lot of times I’ll just use a Set Columns action and set a boolean value to ‘true’ or ‘false’. In most cases it’s the same as 1 or 0.

---

<div class="post-metadata">

**Author:** ![Jacktools\_Net](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jacktools_net/32/18500_2.png) [@Jacktools\_Net](https://community.glideapps.com/u/Jacktools_Net)\
**Post date:** [February 7, 2021, 9:55pm UTC](https://community.glideapps.com/t/can-we-toggle-boolean-items-using-custom-actions/22378/4 "2021-02-07T21:55:29Z")

</div>

You can use the if statement in your custom action.

If cell is true set it to false else set it to true.  
Than you have a toogle effect.

---

<div class="post-metadata">

**Author:** ![Tyler\_Scheviak](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tyler_scheviak/32/11811_2.png) [@Tyler\_Scheviak](https://community.glideapps.com/u/Tyler_Scheviak)\
**Post date:** [February 8, 2021, 2:22am UTC](https://community.glideapps.com/t/can-we-toggle-boolean-items-using-custom-actions/22378/5 "2021-02-08T02:22:20Z")

</div>

This works for the first instance, but when if I change my mind on the filter it will need some additional conditions made if I’m not mistaken. A simple toggle would be nice IMO

---

<div class="post-metadata">

**Author:** ![Tyler\_Scheviak](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tyler_scheviak/32/11811_2.png) [@Tyler\_Scheviak](https://community.glideapps.com/u/Tyler_Scheviak)\
**Post date:** [February 8, 2021, 2:22am UTC](https://community.glideapps.com/t/can-we-toggle-boolean-items-using-custom-actions/22378/6 "2021-02-08T02:22:39Z")

</div>

I’ll give this a try! Great idea

---

<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 8, 2021, 2:36am UTC](https://community.glideapps.com/t/can-we-toggle-boolean-items-using-custom-actions/22378/7 "2021-02-08T02:36:41Z")

</div>

Should have clarified. I use an IF statement in my compound action like the others mentioned. I’ve used true/false as well as 0/1 depending on the situation. So it does toggle back and forth.

It’s what I do in the examples here.

> [@Reset Multiple Rows At Once](https://community.glideapps.com/t/reset-multiple-rows-at-once/22211):
>
> There have been several requests for people to find a way to clear a value in multiple rows. I was thinking about that and came up with a quick example of a way to handle that. Instead of trying to clear a value in an entire column, I realized we could just change one value on a parent column, load it as a single value in our sheet and then compare that parent value to a column that we set or unset for each row. It’s not about clearing an entire column, it’s about making a value in each row n…
