@Jeff_Hager
Thanks for the feedback. Yes, based on his immediate feedback it sounds like BDan’s issue is within this specific app.
URL parameters were the obvious and common solution for this type of thing hence the original post of this thread I submitted seeking how to use URL parameters within Glide. Even after the following I still think URL Parameters are the better engineering solution for this and Glide should give us the option to disable PWA functionality on a per app basis and go browser only.
The rest of this reply is probably worthy of its own post…
I was intrigued by @Jeff_Hager suggestion of a different method.
It hadn’t occurred to me to “hack” the collection component to get a URL directly to a Row’s Detail Screen and induce behavior like URL parameters but with a fixed URL. Same goes for “new screen”. Strongly suggest “new screen” as “detail screen” is shared among all collections connected to the same data source table (this is a quirk with Glide).
I ended up landing on the same headache - it’s possible to truncate the URL without the location string and generate phantom requests without a location…
Anyway, I hacked together a quick demo app:
QR Code style PURL to make a request from USA
QR Code style PURL to make a request from Canada
QR Code style PURL to make a request from Mexico
There are some things to be aware of here:
The URL will have a string of the screen (9d21a8) or its slug “pickup” in this case.
The URL will have a string of the collection within the screen. Example: “bb1dda”
The URL will have a string of the location RowID. Example: “NP7V7EVWS3eotZrk13jc8g”
The truncated URL without a location string Request at Location Demonstration App will generate phantom records like I described just like with URL parameters. This was a big surprise. I didn’t think it was possible to load a “null” details screen in Glide which is basically what this is.
Know the differences and ramifications on going forward with a “details screen” and a “new screen” with the collection!!!
Plan, plan, plan. When it comes to QR codes you are mixing the physical and the digital. Relabeling/reprinting everything and tracking down all existing labels can be an absolute nightmare.
Love the analysis. I’ll have to dig into this in more depth. Would you be willing to create a template of this app that can be copied? I’d be interested in playing around with it.
I’m somewhat surprised about the phantom screen as well. I guess there are cases where glide will always show some components, such as static text, but anything data driven will usually be hidden. I guess a form container usually doesn’t rely on underlying data (except in your case), so like static text it probably still displays even though the screen is disconnected from any data row.
The first thing I would maybe explore is adding a visibility condition to the form container so it only displays if rowID is not empty for example.
Yeah, I had thought about visibility suppression as a work-around. I introduced a form container one and it worked. Not a big fan of using visibility for this type of thing but I suppose the security tradeoff here is very minor.
Jeff, Darren, @mkbw, thank you for your support on this topic and for the ideas you’ve shared.
After discussing with the Glide support team, the issue has been resolved. Both the new and old columns built with “Get part of URL (of the current screen)” are now working correctly—specifically, the “search” property in the URL is properly including the query parameter information.
The main problem seemed to be linked to a Visibility condition on the page where we’re using the “Get part of URL” column (something simple like “Current User Email is valid”). It turns out this Visibility condition was causing the malfunction.
It seems strange, but after running several tests, this appears to be the leading cause. Any thoughts on why this might be happening?
Thanks very much for the follow up on the cause here and the screen recording you followed up with as well.
Visibility conditions by design aren’t supposed to have this effect. I assume that support escalated this issue to dev/engineering at Glide.
It appears that visibility conditions at tab level are not accessible right now in the editor (clicking add condition goes nothing). Adding visibility conditions is still working for components and subcomponents in the editor. I suspect that dev/engineering is actively working on this.
I heard you say in the screen recording that it doesn’t matter on which condition. I am curious if you tried a visibility condition related to a table other than the users table? Perhaps the users table being “special” is the cause?
@BDan So you are saying that just having a visibility condition on the tab breaks the ability get the query parameters, even if the visibility condition is valid?
It doesn’t really make sense to me, but maybe it’s a timing issue where the get part of url runs before or after the visibility condition kick in and??? I think computed columns only run when necessary, so if a visibility condition wasn’t met to display the tab (maybe even for a moment), the computed columns wouldn’t run.
Another thought is that something behind the scenes is causing the get part of url to not see any query parameters.
Not sure. I’m digging deep to come up with an explanation, but on the surface, I don’t know why it would not work.
@mkbw I haven’t had a chance to look at the template yet. I’m hoping by this weekend I can play around with it.
Visibility Condition at page/tab level is the cause of malfunction:
@mkbw: I am curious if you tried a visibility condition related to a table other than the users table? Perhaps the users table being “special” is the cause?
Not possible to set a visibility condition outside of User table properties. At least not for my environment.
@Jeff_HagerI think computed columns only run when necessary, so if a visibility condition wasn’t met to display the tab (maybe even for a moment), the computed columns wouldn’t run.
Maybe
Final response from the Glide Support team clarifying the observed issues:
The “Get part of URL” is designed to show the the data of the current tab. However, when there is a change on that tab, the column will not show some of the parameters. We understand this is a limitation.
If this is an essential part of your app’s functionality, please navigate to community.glideapps.com, search for your idea, and vote if others have already submitted it. If it’s a new idea, create a topic and add your idea for others to vote on.