# Can I use a button block to change the filter on a list below it?

**URL:** https://community.glideapps.com/t/can-i-use-a-button-block-to-change-the-filter-on-a-list-below-it/64254
**Category:** Ask for Help
**Created:** [July 22, 2023, 3:43pm UTC](https://community.glideapps.com/t/can-i-use-a-button-block-to-change-the-filter-on-a-list-below-it/64254 "2023-07-22T15:43:13Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![Todd\_Callen](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/todd_callen/32/61512_2.png) [@Todd\_Callen](https://community.glideapps.com/u/Todd_Callen)
#### Post date: [July 22, 2023, 3:43pm UTC](https://community.glideapps.com/t/can-i-use-a-button-block-to-change-the-filter-on-a-list-below-it/64254/1 "2023-07-22T15:43:13Z")

</div>

![Screenshot 2023-07-22 at 11.38.09 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/a/faf5e89819a6735a6701d2a53ae5f792d35001f3.jpeg)

How do I fill out the actions for each button in the button block?  
Right now I do not have a “status” field for each submission, so grouping the whole list isn’t an option. I am hoping to just use buttons to keep scrolling to a minimum.

---

<div class="post-metadata">

### Author: ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)
#### Post date: [July 22, 2023, 4:07pm UTC](https://community.glideapps.com/t/can-i-use-a-button-block-to-change-the-filter-on-a-list-below-it/64254/2 "2023-07-22T16:07:59Z")

</div>

1. A user specific column to hold the choice from button.

2. Single value to apply choice to all rows.

3. ITE column to compare choice to submission status

4. Filter collection based on ITE column

…that’s one way to do it

---

<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: [July 23, 2023, 12:00am UTC](https://community.glideapps.com/t/can-i-use-a-button-block-to-change-the-filter-on-a-list-below-it/64254/3 "2023-07-23T00:00:42Z")

</div>

If he builds it on top of the user profile screen, the single value column isn’t needed, since you can use the user profiles column value right in the ITE step. I think this is why I almost always build on top of the user profiles screen.

---

<div class="post-metadata">

### Author: ![Todd\_Callen](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/todd_callen/32/61512_2.png) [@Todd\_Callen](https://community.glideapps.com/u/Todd_Callen)
#### Post date: [July 23, 2023, 1:34pm UTC](https://community.glideapps.com/t/can-i-use-a-button-block-to-change-the-filter-on-a-list-below-it/64254/4 "2023-07-23T13:34:44Z")

</div>

ITE 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: [July 23, 2023, 1:39pm UTC](https://community.glideapps.com/t/can-i-use-a-button-block-to-change-the-filter-on-a-list-below-it/64254/5 "2023-07-23T13:39:25Z")

</div>

> **[Glide • If → Then → Else Column](https://www.glideapps.com/docs/reference/computed-columns/if-then-else-column)**
>
> Produce different values based on conditions.

---

<div class="post-metadata">

### Author: ![Todd\_Callen](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/todd_callen/32/61512_2.png) [@Todd\_Callen](https://community.glideapps.com/u/Todd_Callen)
#### Post date: [July 23, 2023, 2:05pm UTC](https://community.glideapps.com/t/can-i-use-a-button-block-to-change-the-filter-on-a-list-below-it/64254/6 "2023-07-23T14:05:34Z")

</div>

@Darren_Murphy, your rock. You have helped me so much so far!

---

<div class="post-metadata">

### Author: ![Todd\_Callen](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/todd_callen/32/61512_2.png) [@Todd\_Callen](https://community.glideapps.com/u/Todd_Callen)
#### Post date: [July 23, 2023, 7:37pm UTC](https://community.glideapps.com/t/can-i-use-a-button-block-to-change-the-filter-on-a-list-below-it/64254/7 "2023-07-23T19:37:06Z")

</div>

I am having trouble unpacking what I am supposed to do to follow these instructions.

I added ite\_Submission Status to the Missions (not the Missions Log) table. I think I set it up correctly because the results look correct:

 ![Screenshot 2023-07-23 at 4.21.03 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/7/f767f269e99649c07a3d2631769aa027e85cf020.png)

Now what?

---

<div class="post-metadata">

### Author: ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)
#### Post date: [July 23, 2023, 9:48pm UTC](https://community.glideapps.com/t/can-i-use-a-button-block-to-change-the-filter-on-a-list-below-it/64254/8 "2023-07-23T21:48:53Z")

</div>

Let’s use ThinhDinh’s advice and write the choice from your button to the user profile sheet. It could be a basic column in your user profile sheet that holds the choice value.

Then you could use the user profile value to filter the collection.

---

<div class="post-metadata">

### Author: ![Todd\_Callen](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/todd_callen/32/61512_2.png) [@Todd\_Callen](https://community.glideapps.com/u/Todd_Callen)
#### Post date: [July 23, 2023, 11:38pm UTC](https://community.glideapps.com/t/can-i-use-a-button-block-to-change-the-filter-on-a-list-below-it/64254/9 "2023-07-23T23:38:34Z")

</div>

So…create a user-specific column in my Users table and have each button write a status there to match with the new ITE\_Mission Status field I put in the Mission Log (submission) table?

Well, I did that, and then I added this field to my user (Players) table:

 ![Screenshot 2023-07-23 at 7.49.06 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/5/9558b0aa0c9ddfd109cd03599ce9074654e8a9a7.png)

I think this is supposed to receive the value from whatever button is pushed, so then I went to button #1 (To Do) and tried to get it to write to that row in the Players table.

I set the row choice to look at the User table (I think I got that right), but my new column didn’t show:

 ![Screenshot 2023-07-23 at 7.50.09 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/b/9b3beb0d79a99304226249a76e681995291643b1.jpeg)

 ![Screenshot 2023-07-23 at 7.50.26 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/2/428bd27001ebaa825ba21e0c79722a16d638ae42.png)

What am I missing? Did I guess right so far?

---

<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: [July 23, 2023, 11:52pm UTC](https://community.glideapps.com/t/can-i-use-a-button-block-to-change-the-filter-on-a-list-below-it/64254/10 "2023-07-23T23:52:42Z")

</div>

> [@Eric\_Penn](#):
>
> A user specific column to hold the choice from button.

Yes, create a column in your User Profiles table to hold the choice. I don’t know which table you’re building your screen on, but I think a good practice is to always use the User Profiles table, it allows flexibility down the line. Make sure you filter the screen to the signed-in user’s row using the rowID or email.

You don’t need to have 3 buttons, it can be just a single choice component with 3 choices.

> [@Eric\_Penn](#):
>
> ITE column to compare choice to submission status

In your Submissions table, create an If Then Else column to compare the status of each row to the user-specific value in the 1st step, which you can reference as it’s a user profiles value.

If the user profiles value is empty, return true (meaning you show all submissions when nothing has been filtered). If the user profiles value is the same as the row’s status, return true. Else don’t return anything (you don’t have to write false, nothing is enough).

> [@Eric\_Penn](#):
>
> Filter collection based on ITE column

Filter by the If Then Else column being checked (having a true value).

---

<div class="post-metadata">

### Author: ![Todd\_Callen](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/todd_callen/32/61512_2.png) [@Todd\_Callen](https://community.glideapps.com/u/Todd_Callen)
#### Post date: [July 24, 2023, 12:09am UTC](https://community.glideapps.com/t/can-i-use-a-button-block-to-change-the-filter-on-a-list-below-it/64254/11 "2023-07-24T00:09:21Z")

</div>

Right now I am building the table from my “Missions” table.

I made a copy screen to try doing it from the “Players” table (users) instead.

 ![Screenshot 2023-07-23 at 8.07.44 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/b/8bc83cdc0b17ed80f93902bd3154ab9de6480b4f.jpeg)

Now what? The Players table does not know the Mission Status data from the Mission Log table yet, so I am stuck. Next step?

---

<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: [July 24, 2023, 12:34am UTC](https://community.glideapps.com/t/can-i-use-a-button-block-to-change-the-filter-on-a-list-below-it/64254/12 "2023-07-24T00:34:54Z")

</div>

> [@Todd\_Callen](#):
>
> The Players table does not know the Mission Status data from the Mission Log table yet

Can you explain this? I don’t think I understand.

---

<div class="post-metadata">

### Author: ![Todd\_Callen](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/todd_callen/32/61512_2.png) [@Todd\_Callen](https://community.glideapps.com/u/Todd_Callen)
#### Post date: [July 24, 2023, 12:25pm UTC](https://community.glideapps.com/t/can-i-use-a-button-block-to-change-the-filter-on-a-list-below-it/64254/13 "2023-07-24T12:25:36Z")

</div>

Players table = users table  
Mission table = list of assignments  
Mission Log table = individual records of student-submitted assignments (this is where the mission status of each submission lives)

Right now, the Players table does not contain anything about users’ assignment submissions.

Your suggestions have me changing direction with what goes where, and I think I only have half of what you need to be in my Players table to get the desired selection-driven filtered lists I had requested.

---

<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: [July 25, 2023, 12:07am UTC](https://community.glideapps.com/t/can-i-use-a-button-block-to-change-the-filter-on-a-list-below-it/64254/14 "2023-07-25T00:07:48Z")

</div>

So is your ultimate aim showing missions to the Players in this form where they can filter by To Do/Submitted/Graded?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/f/cf2501211a64901606e4b0ee65cba323cda25b24.jpeg)

If you collect the user’s ID/email in the Mission Log table, you can have a relation/query to show their submitted/graded assignments.

For “To Do”, in the Mission table, create a query that filters the Mission Log table by Mission ID and signed-in user’s ID/email, then only show Missions where the query is empty.
