I’m new to Glide and I have virtually no prior experience in programming or architecture. I have the Starter Team plan.
I’m trying to build a simple web-app that allows the users to do the following:
Sign in on the platform → Done
Allow the signed in user John Doe to upload inventory, e.g. a product (Shovel), amount (100), location (area 51) etc. → Done
I have struggles doing the following:
The logged in users can only see what they have published, e.g. John Doe only sees his inventory of 100 shovels. → This I have not achieved. John Doe can see ALL inputs. How do i filter/alter visibility that users can only see what they have published?
How can I customize the Sign in page? There is no option to modify the layout in the Sign In screen settings?
I have tried solving this myself. I watched this video but the Glide UI has changed so it’s not that helpful tbh.
Hi, the simplest and most secure way, which will also keep your app nice and speedy, is to implement “row owners”. To accomplish this, you must write the signed-in user’s email address to a column in your inventory, and then set that column to be “row owner”. Here, you can see it’s giving me the option to remove the “row owner” setting from the column, because it is already set.
Only the user’s entries will download to the device and be visible.
You can do some customizing, but not of the layout. If you go into your applications settings, there is a “sign-in” options tab (don’t forget to set the “theme”.
Is there any possibility that Glide could fetch the email automatically whenever someone adds a product, so that neither the user or me (or any admin) would need to manually insert it for the row owner functionality to be used?
Yes, add the email column and set it as row owner:
Then on your entry screen, add an email special value:
Make sure it is pointing to your “owner” column (see upper right of this screen). The column will not be visible to the user, but will automatically be filled in as they add entries.
You will need to manually fill any previous entries.
This works. However, a new problem has occurred. When I make the Owner column the row owner, the “add product” function i have disappears from users who don’t have any inputs.
Here is the view of a user that has made an input in the upper right corner “add product” function. I made the input using a user in the Glide admin interface.
I don’t think components that don’t have any visibility conditions should disappear when there’s no data. I’ve encountered this in Apps. Looks like he’s building Pages. I have worked around it in Apps, but don’t know how to work around it in Pages.
I solved the problem. It had to do with the custom layout from Glide. By building the same layout myself I was able to remove the issue. Not sure how, but it works…
Thanks very much @David_Gabler for your unconditional help, much appreciated.
The collection in Pages will disappear if there’s no data for it to display. I have always thought it should keep the header and the action, if there are any, but for the moment my workaround is to add a container with 2 columns: 1 text component for the left and 1 button on the right, and have a condition to only show it when there are no items for my collection to display.
yeah, agreed. I’ve been using a similar workaround.
It’s particularly annoying if you’re using a title bar action to Add records.
If you start with an empty collection, then you have to use the workaround just to get the first record added.
At the very least, if there is a title action, then that should show.
I think I’d consider that a bug.
I solved the problem. It had to do with the custom layout from Glide. By building the same layout myself I was able to remove the issue. Not sure how, but it works…
Thanks very much @David_Gabler for your unconditional help, much appreciated.