Failing to build some vary basic functionalities. I want to learn - anyone here to help?

Hi all

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:

  1. Sign in on the platform → Done
  2. 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:

  1. 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?
  2. 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.

Thanks in advance for all guidance :slight_smile:

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.

image

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”.

Thanks @David_Gabler :slight_smile:

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?

Br
Sunray

@David_Gabler The Glide developing portal UI looks different for me. I cannot choose “theme”. Do you have any idea why this is?

Yes, add the email column and set it as row owner:
image

Then on your entry screen, add an email special value:
image

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.

2 Likes

Not sure, perhaps it’s related to what settings you chose on your “Appearance” tab:

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.

When I log into the URL from another computer with another email, the site is empty and there is no “add product” functionality.

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.

@DJP To add, I have no visibility or filter conditions.
Also, I am using the “Inventory” template from Glide’s library.

Yeah, I’m removing my tag. I probably tagged the wrong person. Hopefully someone else will jump into the conversation.

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… :slight_smile:

Thanks very much @David_Gabler for your unconditional help, much appreciated.

1 Like

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.

1 Like

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.

1 Like

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… :slight_smile:

Thanks very much @David_Gabler for your unconditional help, much appreciated.

Does anyone have an answer as to why I can’t brand the sign-in screen? Is it because i only have the “Starter Project” plan, i.e. the cheapest plan?

You should be able to do it even with the starter plan if you pay for white listing.