Filter choice options from multiple Boolean

Hey

Feel like I might be close but the logic is eluding me. :face_with_raised_eyebrow:

I have a list of events in a drop down choice list. The choice lists below this one contain names that are filtered according to the first selection. I have managed to filter the gender and age but cannot figure out how to also filter according to the specific events that have been checked in the Glide table.

Ideally, only the names of the students taking part in the selected event would be shown in the drop down list.

Is this possible?

Where are you writing the choices from your 1st screenshot to? How do they relate to the 2nd one?

The gender is filtered through a name relation, as shown here: image

and the year level is filtered as per the steps in these pics

image

image

.

Works well, but I am hoping to use the checkbox info as well.

I’m not sure if I understand the full structure of your data. Let’s get a simple question done first. When I click the choice under “1st” in your first screenshot what options do I have?

1 Like

A list of names drops down. These are filtered according to the option selected in the ‘Select Event’ drop down.

The app is for adding points in a competition with multiple events. The ‘1st’ choice is the person who came first, the ‘2nd’ is the person who came second etc.

So let’s say I select “Year 4 Girls Long Jump” then the choice component would only show those that is a member of “Year 4 Girls Long Jump” right? Then the 4 choices are basically to record the event results?

Next, I believe you haven’t shown this in your screenshots, how are you letting the users “filter” the app? What does that flow look like?

Yes, that’s correct.

The events and all the competitors in each event are set by the user in the days before the event begins. The user can set up nominations by going in the athlete list, selecting a student, and then assigning them their events.

And then, once each event is finished, results are entered. Points are assigned accordingly for champions and over house winners.

Just looking at this, what I think you might need to do is coerce all those boolean event columns into a single column that you can use as a filter for your student choice components.

You could do this using two extra columns in that same table:

  • Firstly, a single value column that would take the value of your user specific column that has the event selection, and cast that across all rows.
  • You then add an if-then-else column that looks at that single value and returns the value of the associated boolean column. Something like:
    – If single value is “Long Jump”, then long jump boolean
    – Else if single value is “High Jump”, then high jump boolean
    – etc, etc

You should then be able to use that if-then-else column as a filter, returning only those rows that have a true value.

2 Likes

Thanks. I had managed to get all the booleans in a single column and used it as a filter but it was not dynamic. I want it so that any user can change event types without breaking the logic.

I’ll try it as you suggested, cheers.

If you do it as I described it should be dynamic, as it’ll be driven by the value of the user specific column, which is in turn set by the first choice component.

Works! This is brilliant, thanks. :star_struck:

Used the ‘includes’ condition instead of an absolute ‘is’. Hope this doesn’t lead to the wrong data being displayed in some situations, but the other filters should hold it all in place.

image

1 Like

Just a tip for the future to help avoid this possibility. Use two columns for your choices. A human readable value for display, and then an ID or something for the actual value that’s written to the user specific column. Then you can be more explicit when referring to the column and not have to worry about typos tripping things up.

3 Likes

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