# Needing help with a “toggle”

**URL:** <https://community.glideapps.com/t/needing-help-with-a-toggle/71143>\
**Category:** Ask for Help\
**Created:** [February 25, 2024, 7:56pm UTC](https://community.glideapps.com/t/needing-help-with-a-toggle/71143 "2024-02-25T19:56:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pedrop](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pedrop/32/71433_2.png) [@Pedrop](https://community.glideapps.com/u/Pedrop)\
**Post date:** [February 25, 2024, 7:56pm UTC](https://community.glideapps.com/t/needing-help-with-a-toggle/71143/1 "2024-02-25T19:56:13Z")

</div>

I want this boolean to be checked if the date is after today, so it will show me only what I need. Like a toggle. How to achieve that?

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 25, 2024, 10:03pm UTC](https://community.glideapps.com/t/needing-help-with-a-toggle/71143/2 "2024-02-25T22:03:44Z")

</div>

What does that toggle do? Only show if the condition is met? Then really, you don’t want a toggle as toggles = user interaction.

In data editor, create an if then else column that outputs `true` if the date is after today, else `false`.

If you want a checkbox, you can display this value in a fields component: otherwise, instead of true/false, you could output an emoji or hero icon.

---

<div class="post-metadata">

**Author:** ![Pedrop](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pedrop/32/71433_2.png) [@Pedrop](https://community.glideapps.com/u/Pedrop)\
**Post date:** [February 26, 2024, 12:52am UTC](https://community.glideapps.com/t/needing-help-with-a-toggle/71143/3 "2024-02-26T00:52:39Z")

</div>

Hey, Robert, thanks for the answer.

I’m building a to-do section for my app, in this to-do I added 2 collections. One being Today’s tasks and the other being Upcoming tasks. I wanted to add a switch between them which when hit, the upcoming tasks wouldn’t be shown. I don’t know if that’s possible.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [February 26, 2024, 1:03am UTC](https://community.glideapps.com/t/needing-help-with-a-toggle/71143/4 "2024-02-26T01:03:30Z")

</div>

I think a choice component would look better. The two choices would be “today” and “upcoming”. You write it to a user-specific column.

Then you either show/hide 2 collections with that choice, or use it as a filter. If you use it as a filter, you must have an If-Then-Else column in the table to determine which events are “Today” and which are “Upcoming”.

---

<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:** [March 4, 2024, 1:03am UTC](https://community.glideapps.com/t/needing-help-with-a-toggle/71143/5 "2024-03-04T01:03:33Z")

</div>

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