Want to create a filter to search table based on ranges of criteria

I have a table of board game data for 100+ board games (playing time, number of players etc). I want to be able to search through that data on my app to find specific games that meet specific criteria (ie "4 players, 60 min playing time etc"). For some reason, I can't find the resources I need to make this work. Any advice?

0 12 231
12 REPLIES 12

This seems close to what I need but I'm thrown off by the sample requiring the use of a current_user variable. I also don't understand how the formulas allow for user input.

Thanks. I should have been more clear. I don't need special user permission to use the app. This is a simple inventory management app meant for a small group of people to be able to find board games in an inventory based upon specific criteria.

Understood. Re your question about "the use of a current_user variable", see the tip's section about custom metadata for users. In the video, the fields in the "control box" are columns in the current user's row in a Users table.

I think I see what I need to do. I need to create a new filter table. Dependent dropdown. Do you have any resources for what those tables look like? Is it just a subset of data from the original database?

Include a column for each criterion you want users to be able to filter on (e.g., "playing time, number of players "). If you want each user's filter selections to apply only to them, be sure to also include a column that identifies the user.

Ok got it. What data goes in the columns of the filter table? Or are the rows left empty?

The values selected by users to apply in filtering the board game data.

But I have to create the table, right? So when I create the table do I need to include data in the columns? Or are they supposed to have a function in them? Or are they left empty and then the information is filled in by the functions from the dashboard?

Imagine your users were using a view in your app to edit data in a row of the board games table. If the row has any existing data, they'd see that and be able to modify it. That's exactly how you need your users to be able to interact with your new filters table. A user will see a row's data via an app view and the data will either be empty and the user can fill it in to start filtering or it won't be empty and they can revise it to change the filter criteria already applied.

Most of all, just try it--you're likely to understand better how it works by concretely implementing it.

Ok I will mess around with it and see if I can get it to work. I appreciate your help.

Top Labels in this Space