I am trying to filter a collection list that resides on the details screen once the user selects one of the options. On that next screen, I am having trouble to filter the list based on squad color. The “Crew Stations” collection has 4 squads, I can set the filter to show only one of the squads but the problem is that the same filter collection is showing for the other color squads as well. In other words, when a user selects say Red Squad, only those crew stations will appear in the collection list. Below I selected Blue Squad but the Red Squad is showing because I set the filter for Red over on the Red Squad screen.
I have this, and I can live with it (using a choice component) but it would be more elegant if the list was already filtered when the user clicks into the screen, any ideas?
On the parent screen what if you add a set column value to your action and target the same same column the choice component is writing to
Interesting, let me try that…
I don’t see how it’s going to work. I can only set a column value to one of the 4 options, and the result will be Collection is filtered to the set value I chose if I understand your approach correctly.
In essence, on your items screen, you need to have a single value column taken from the USC (user specific column) where you write the selection. Next, you just need to filter your squad stations collection.
Study one of the default glide apps when you create a new app using glide tables. For example, the default Categories/Things app.
You are thinking each screen is separate when in reality, it is all the same screen, but linked to a different row of data based on the color squad (category) you clicked on. Detail screen layouts are attached to their source table, so you only have to design a screen once and be done.
You don’t need to set a value when clicking an item or use a filter. What you need is a relation. Create a relation in your Squad table linking it to the Stations table. Then when you click on a Squad to view it’s detail screen, set your station collection on that screen to use the relation as it’s source. That’s it. Make your squad screens data driven instead of trying to design squad screen independently.
Imagine if you had 1000 squads. Would you rather design the same screen 1000 times or design it once and let the data determine what should be shown on that screen.