Feel like I might be close but the logic is eluding me.
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.
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?
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?
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.
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.
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.
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.
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.