I’m leaning heavily into helper tables to cut down on the number of columns in my largest tables by moving a lot of computed columns into tables that only have 1-50 rows instead of thousands.
I’m having some issues with this table. Could anyone recommend how to tune up these columns?
Jobs can have multiple trips. When a job is opened, a user specific column is set to the ID of that Job before opening the job detail screen. This helper table is supposed to show the trips that have that Job ID. Here’s what it looks like when viewing the helper table for job trips.
First column is the Job ID from the user table
Second relates that to jobs (single)
Third relates the Job ID to Trips (multiple) (in this case, the relation is empty)
Here’s where I need help
Fourth column gets the whole row from the related trips.
Why is it finding rows from the empty relation? This helper table seems to work fine when the relation is not empty, but pulls up the trips from the previous job when the relation is empty.
Here’s the relation
If there’s a more streamlined way to set up this helper table, I’m all ears. And I need to know why the single value column pulls rows from an empty relation. Thanks in advance!
Caching??? Are you switching users while on the builder? Have you tried restarting the browser or clearly browser cache?
I cleared my cache, restarted, and it worked fine for a minute, then the situation showed up again after opening about 4 different jobs.
Is this even a viable way to set up my screens? It seems pretty shaky right now, and the collection components that are pulling in the wrong rows also have actions, so a user that wasn’t paying close attention could wreak havoc. (The app isn’t live at the moment, but was for a minute earlier today
)
I think what you are attempting to do is fine. It’s essentially what a lot of people do. Seems odd though that the single value column is pulling something out of thin air, like the single value column isnt refreshing when the relation is empty and holds on to previous values. That definitely seems like a bug. Are you able to reproduce in the published app? In either case, I think it’s worth creating a ticket with Glide Support.
I guess some sort of quick workaround would be to prevent showing anything or not allow editing if the relation is empty, so users can’t muck anything up.
I have created a ticket and I have reproduced it in the published app. I’ll update when I get something back from Glide Support.
2 Likes