I’m building a parking permit system in Glide, where multiple users living in the same apartment must be able to view, share, and edit the same permits (e.g., permanent parking permits).
I’m only using 2 tables:
1. Users table:
Columns:
Email
LejlighedsID (Apartment ID, e.g., “1”, “2A”)
Name
2. FastTilladelser table:
Columns:
License Plate (Nummerplade)
LejlighedsID
Goal:
When User A logs in, they should see all permits associated with their apartment (LejlighedsID)
When User B logs in (same LejlighedsID), they should see the exact same permits
Both users must be able to add and edit these shared permits
What I’ve already done:
I created a relation from Users.LejlighedsID → FastTilladelser.LejlighedsID
→ ( Match multiple)
I display this relation using a Collection (List or Card component)
I use User Profile as the base of the screen (confirmed via Settings → User Profile Table)
Problem:
When I log in as a user who shares the same LejlighedsID as another user, no permits are shown in the frontend
The permits do exist in the backend, and have the correct LejlighedsID
I’ve removed all filters and visibility conditions
I’ve selected the correct user using “Viewing as [email]”
Desired functionality:
Users should automatically see and edit shared permits based on LejlighedsID
A maximum of 2 active permits per apartment (optional limit)
When creating a new permit, the LejlighedsID should automatically be assigned from the logged-in user’s profile
I don’t want to create a separate “Apartments” table — I want the system to work using just Users and FastTilladelser.
Can you help me find the best solution in Glide to make this work reliably?
I think this is where the mistake comes from.
Your relation is probably done correctly but despite it’s name, Viewing as in this specific case doesn’t update the relation and stays with the same value (i.e.: the email you are currently logged in with I think).
Have you tested it out for real? I mean by log in as a different user, with a different email address? Do you still face the issue?
Adding values from User Profile
Assuming you’re using a form to let users add permits, there is a simple way to achieve that: in the form, simply add a LejlighedsID avaible under Values from User profile and target the column where this value should be stored:
When the user will hit the Submit button, it’s automatically gonna reach his/her own LeilighedsID value from their user profile and add it to the relevant column inside the FastTilladelser table.
Limit to 2 active permits
This one could also be easily done with this approach:
Add a Rollup column (here Number of Permits) in your Users table to calculate the total of permits:
In the layout, select your Collection and go to Actions → Allow users to add items → Add condition. Set up the condition to allow that action only if User Profile → Number or Permits is less than 2:
If your application should be secure, maybe you will be intersted in enabling Row Owners.
It’s the right way to make sure someone only sees what you want.
Even if it requires some technical skills, without this feature, all the data will be downloaded prior the calculation of the relation. Anyone could theorically access the data. To prevent that, here is the link to the docs: Row Owners | Glide Docs