# Help with filtering add item to task

**URL:** <https://community.glideapps.com/t/help-with-filtering-add-item-to-task/70473>\
**Category:** Ask for Help\
**Created:** [February 4, 2024, 3:05am UTC](https://community.glideapps.com/t/help-with-filtering-add-item-to-task/70473 "2024-02-04T03:05:10Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joe](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe/32/54373_2.png) [@Joe](https://community.glideapps.com/u/Joe)\
**Post date:** [February 4, 2024, 3:05am UTC](https://community.glideapps.com/t/help-with-filtering-add-item-to-task/70473/1 "2024-02-04T03:05:10Z")

</div>

Hi, I’m having trouble filtering my tasks. I have been able to filter by room, and then by task per room, but i’ve been unable to filter when i try to use the “add task” form to write into the columns, I want only the tasks in my database that are for that specific room to show up. However, all my tasks show up instead. I can’t get this solved, either all options go away or all options show when I filter. When i add the task, it writes fine to the table and pulls in the relation. I’m very confused here. Thanks  
i’ve attached a screenshot of the layout, and of the task datatable

 ![Screenshot 2024-02-03 at 10.01.59 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/2/2299d6f9e7ded0bc88f69a63e6c89ca34f2254ad.jpeg)

 ![Screenshot 2024-02-03 at 10.04.38 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/5/75129a84d763a6cbefa8eb397c3b6447771e45ba.png)

---

<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 4, 2024, 4:31am UTC](https://community.glideapps.com/t/help-with-filtering-add-item-to-task/70473/2 "2024-02-04T04:31:12Z")

</div>

Try using a screen filter. It should be something like “RoomID is Screen-\>RoomID”.

Also, what is the purpose of that Set Column Values in your onSubmit action? That should not be necessary.

> **[Screen Values | Glide Docs](https://www.glideapps.com/docs/reference/values/screen-values)**
>
> Values that you can access from the current screen.

---

<div class="post-metadata">

**Author:** ![Joe](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe/32/54373_2.png) [@Joe](https://community.glideapps.com/u/Joe)\
**Post date:** [February 4, 2024, 1:05pm UTC](https://community.glideapps.com/t/help-with-filtering-add-item-to-task/70473/3 "2024-02-04T13:05:50Z")

</div>

> [@Darren\_Murphy](#):
>
> [Screen Values | Glide Docs](https://www.glideapps.com/docs/reference/values/screen-values)

i’ve tried using the filter room ID is screen - room ID and 10 different variations but when i do that, for some reason, all the options for tasks don’t show up instead of the ones only matching the particular room.

The set columns i have writes to the task name once it’s submitted. I have a column that says Task Name and a column that’s lookup task name. when it writes to the lookup task name it automatically feeds the other column.

---

<div class="post-metadata">

**Author:** ![Joe](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe/32/54373_2.png) [@Joe](https://community.glideapps.com/u/Joe)\
**Post date:** [February 4, 2024, 1:06pm UTC](https://community.glideapps.com/t/help-with-filtering-add-item-to-task/70473/4 "2024-02-04T13:06:27Z")

</div>

it looks up the task name in the task template (relation)

---

<div class="post-metadata">

**Author:** ![Joe](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe/32/54373_2.png) [@Joe](https://community.glideapps.com/u/Joe)\
**Post date:** [February 4, 2024, 1:13pm UTC](https://community.glideapps.com/t/help-with-filtering-add-item-to-task/70473/5 "2024-02-04T13:13:13Z")

</div>

diving deeper, maybe it’s because (and i don’t know how to add it) in the task page, i have the Room ID as a relation to the task template datatable, but it doesn’t let me select it. I need a column that shows the Room ID but don’t know how to get it input.

 ![Screenshot 2024-02-04 at 8.10.13 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/c/7cbd436239f8d4dc89204384af0e49371223f215.png)

here, the data is written to the relation task template ID, i’ve just added another column for “lookup Room ID” and when i use that for the filter, it still includes the task for the kitchen i have instead of just bathroom.

---

<div class="post-metadata">

**Author:** ![Joe](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe/32/54373_2.png) [@Joe](https://community.glideapps.com/u/Joe)\
**Post date:** [February 4, 2024, 1:17pm UTC](https://community.glideapps.com/t/help-with-filtering-add-item-to-task/70473/6 "2024-02-04T13:17:34Z")

</div>

![Screenshot 2024-02-04 at 8.14.11 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/7/97454fd2bf9fbd571b47dfb45631bf230af05c31.png)

the Rel Task template shows the Room ID (which shows the correct ID); for example, IUtG is for bathroom. The last task i have points to a different room (kitchen - a-sAir2) but in the add task form, all the task options show up in each room even with this filter (Room ID \> screen\> lookup room ID)

---

<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 4, 2024, 2:47pm UTC](https://community.glideapps.com/t/help-with-filtering-add-item-to-task/70473/8 "2024-02-04T14:47:37Z")

</div>

Okay, I see. It can’t pick up the correct RoomID in the form context. Try this:

- Add a text column to your User Profile row
- Change the action on the form to a custom action, with two steps:  
– Set Column Values, taking the current RoomID and writing it to the new column in your User Profile row  
– Show Form Screen
- You should then be able to use that value in your User Profile row as a filter on the Choice component

---

<div class="post-metadata">

**Author:** ![Joe](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe/32/54373_2.png) [@Joe](https://community.glideapps.com/u/Joe)\
**Post date:** [February 4, 2024, 4:40pm UTC](https://community.glideapps.com/t/help-with-filtering-add-item-to-task/70473/9 "2024-02-04T16:40:02Z")

</div>

still not working. it writes, but doesn’t pick up the screen.

---

<div class="post-metadata">

**Author:** ![Joe](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe/32/54373_2.png) [@Joe](https://community.glideapps.com/u/Joe)\
**Post date:** [February 4, 2024, 4:54pm UTC](https://community.glideapps.com/t/help-with-filtering-add-item-to-task/70473/10 "2024-02-04T16:54:35Z")

</div>

im even trying to filter the row ID (task template) to match the task template ID on my tasks page, but that doens’t pick up either. It seems no matter what i do it won’t read it and filter properly

---

<div class="post-metadata">

**Author:** ![Joe](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe/32/54373_2.png) [@Joe](https://community.glideapps.com/u/Joe)\
**Post date:** [February 5, 2024, 2:08am UTC](https://community.glideapps.com/t/help-with-filtering-add-item-to-task/70473/11 "2024-02-05T02:08:22Z")

</div>

wonder if this would be solved by a dynamic list filter of choice? Not sure how to do that though, what columns to create to allow it.

---

<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, 2024, 2:37am UTC](https://community.glideapps.com/t/help-with-filtering-add-item-to-task/70473/12 "2024-02-05T02:37:30Z")

</div>

That’s exactly what my previous suggestion was supposed to give.  
I don’t understand why that doesn’t work for you - it should.  
Would you mind making another video showing how you set that up and where it failed?

---

<div class="post-metadata">

**Author:** ![Joe](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe/32/54373_2.png) [@Joe](https://community.glideapps.com/u/Joe)\
**Post date:** [February 5, 2024, 4:00pm UTC](https://community.glideapps.com/t/help-with-filtering-add-item-to-task/70473/14 "2024-02-05T16:00:26Z")

</div>

![Screenshot 2024-02-05 at 10.59.08 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/7/b7e3142d12a44149dbecc1b04d756703f5dba973.png)

i have it writing to the new column but it shows the room being written, not sure if it should write the room name or the task name, the task is input on the prior image. the task template ID pulls correctly and matches to what is in the task database.

---

<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 9, 2024, 11:34pm UTC](https://community.glideapps.com/t/help-with-filtering-add-item-to-task/70473/16 "2024-02-09T23:34:32Z")

</div>

> [@Help with filtering add item to task](https://community.glideapps.com/t/help-with-filtering-add-item-to-task/70473/8):
>
> Okay, I see. It can’t pick up the correct RoomID in the form context. Try this: Add a text column to your User Profile row Change the action on the form to a custom action, with two steps: – Set Column Values, taking the current RoomID and writing it to the new column in your User Profile row – Show Form Screen You should then be able to use that value in your User Profile row as a filter on the Choice component

Sounds like you’re still trying to filter by the screen value. Have you tried the suggestion above?

---

<div class="post-metadata">

**Author:** ![Joe](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe/32/54373_2.png) [@Joe](https://community.glideapps.com/u/Joe)\
**Post date:** [February 16, 2024, 7:06pm UTC](https://community.glideapps.com/t/help-with-filtering-add-item-to-task/70473/17 "2024-02-16T19:06:35Z")

</div>

yes I think, but i’m not sure where to put the fields or if i did it right or if this issue is in my relations.

Which User Row is it talking about? My user profile table which is a different table? Or create a column on on the User Task or room? I’m lost on this one

---

<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 16, 2024, 11:56pm UTC](https://community.glideapps.com/t/help-with-filtering-add-item-to-task/70473/18 "2024-02-16T23:56:36Z")

</div>

> [@Joe](#):
>
> Which User Row is it talking about? My user profile table which is a different table?

It’s the row in the table where you set up as your User Profiles table. The difference with that table is you can always access values tied to it through the User Profile dropdown when you want those values in a bunch of actions/columns/components as needed.

What Darren suggested was to write the Room ID to a column in your User Profiles row, when you navigate to the room’s details screen. At that point, you know what Room ID you’re viewing when you open the form and can reference it as a filter on your choice component.

---

<div class="post-metadata">

**Author:** ![Joe](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe/32/54373_2.png) [@Joe](https://community.glideapps.com/u/Joe)\
**Post date:** [February 21, 2024, 4:32pm UTC](https://community.glideapps.com/t/help-with-filtering-add-item-to-task/70473/19 "2024-02-21T16:32:00Z")

</div>

I still can’t get this. Will i be able to get additional help once I upgrade my plan?

---

<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 21, 2024, 11:31pm UTC](https://community.glideapps.com/t/help-with-filtering-add-item-to-task/70473/20 "2024-02-21T23:31:06Z")

</div>

Can you explain what you mean by “additional help”?

---

<div class="post-metadata">

**Author:** ![Joe](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe/32/54373_2.png) [@Joe](https://community.glideapps.com/u/Joe)\
**Post date:** [February 22, 2024, 10:04pm UTC](https://community.glideapps.com/t/help-with-filtering-add-item-to-task/70473/21 "2024-02-22T22:04:51Z")

</div>

How would I do this with 10 different rooms? I keep getting stuck over here on filtering the list of choices. II’ve watched a few videos and no matter what i can’t seem to get it to filter properly. There was something on YouTube i saw, but requires a live site for the hack. I’ve tried rebuilding the database from scratch and i get to the same spot.

The other option is to have each room have it’s own table of tasks; but then on dashboard it’ll be fragmented with adding 10 collections so filtering won’t work well.

If there’s good resources on writing to columns that would be helpful to me too.  
Thanks

---

<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 22, 2024, 11:39pm UTC](https://community.glideapps.com/t/help-with-filtering-add-item-to-task/70473/22 "2024-02-22T23:39:37Z")

</div>

Let’s circle back here. I still believe this should work.

> [@Help with filtering add item to task](https://community.glideapps.com/t/help-with-filtering-add-item-to-task/70473/8):
>
> Okay, I see. It can’t pick up the correct RoomID in the form context. Try this: Add a text column to your User Profile row Change the action on the form to a custom action, with two steps: – Set Column Values, taking the current RoomID and writing it to the new column in your User Profile row – Show Form Screen You should then be able to use that value in your User Profile row as a filter on the Choice component

Which parts of Darren’s comment have you implemented? Can you show us in a video?

---

<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 23, 2024, 11:32pm UTC](https://community.glideapps.com/t/help-with-filtering-add-item-to-task/70473/24 "2024-02-23T23:32:37Z")

</div>

> [@Darren\_Murphy](#):
>
> Change the action on the form to a custom action, with two steps:  
> – Set Column Values, taking the current RoomID and writing it to the new column in your User Profile row

Have you actually added this step when you open your form? I don’t understand.

> [@Joe](#):
>
> When I create a “RoomID” column in my “User Profile” table, it’s after the fact of selecting a task.

Are you using Airtable for this app? Why is your choice component writing to a relation?

[Next page](https://community.glideapps.com/t/help-with-filtering-add-item-to-task/70473.md?page=2)
