Looking for help filtering checklist

Hi all. Literally my first day using Glide and I’m having trouble building a checklist app that lets me filter the items that show up on my checklist.

My use case is I’d like to create a simple packing checklist. I have a list of things that I pack on every trip and then I have a few other things that I need to bring on work trips. So I’d like a switch that I can turn on for work trips that will show those extra items. I’ve been poking around on YouTube and in the community now for a couple hours and I can’t seem to figure it out.

If possible, I’d also like to include a button at the bottom that will reset the checklist so anything I’ve checked off will un-check and I’m ready for my next trip.

And incidentally, I noticed in the layout builder that all the buttons and navigation seem to work but the checklist dots don’t seem to work. Like, I click on it expecting the dot to get filled in and nothing happens. Is that how it’s supposed to be?

Thanks so much for any help you can give me.

Do you have a column in your table that identifies those items?
If you don’t, you should add one, and then use that as a filter.
If you show me how your list looks in the Glide Data Editor, I can possibly give some more specific guidance.

This is a little tricky. Can I assume you are working with a Free Plan, and as such don’t have access to the API?
If that’s correct, then your best option is to use the “ParentID reset” trick as described here.

1 Like

Thanks Darren! I have added a column that identifies those items. I’ll include a screenshot below, in case that’s helpful. If I’ve set up the data correctly, I could really use some help with the logic to make the “Houston” switch filter things on my packing list.

That’s simply a matter of applying a collection filter.

1 Like

Okay, thanks Darren. I think I understand collection filters. The problem I’m having is I’d like to use a switch component above my checklist that essentially turns the filter on and off. So when the switch is on, a subset of the list is displayed (the items where “Houston” is true), and when the switch is set to off, the whole list is displayed. Can you explain how to do that?

I really appreciate your help and my apologize for not knowing this program better. :slight_smile:

Okay, so what you could do is add one more boolean column to your table, but make it User Specific. Your switch component will write to this column. As the switch will only set the value in the first row, you need to apply that to all rows. For this, a Single Value column can be used.
Then you need an if-then-else column to compare the values in each row. The if-then-else should be configured like so:

  • If Single Value boolean is empty, then true
  • If Houston is checked, then true

Finally, you use the if-then-else column as a filter on your collection, only showing those rows where it is checked.

1 Like

Okay! Great success! I got the list to filter based on the switch. Thanks for that explanation. I didn’t realize that the switch sets the value for the first row.

Moving on to the “ParentID reset” trick, I tried to copy everything you created but I couldn’t get it to work. One clarifying question: I noticed that you used a “list” style collection. Is there any reason you didn’t use a “checklist” style? I’m wondering if that might be the issue.

Thank you Darren!!! You’re a lifesaver!

Strictly speaking it sets the value in the row that the screen is attached to. But it could set a value in a different row, depending on how things are set up. But the important point is that it only ever sets a value in a single row.

Yeah, I don’t believe that will work with a checklist. The check box expects to be able to write to a non-computed column, so you can’t use the if-then-else column as the source of that.

Okay Darren. I’m almost there. :slight_smile: I’ve got the reset button working and the filtering working. The only thing I’m missing now is the user can no longer edit or add things to the checklist. These options were under “Actions” but they’re no longer available when I enabled advanced actions. Is it still possible to let users add, edit, and delete items?

Thank you!!!

The Add and Edit actions should still be there. You may need to add them if they aren’t there. Advanced Actions just open it up to more advanced customization. Can you show what the action tab looks like for your collection?