# Filtering image based on user's profile

**URL:** https://community.glideapps.com/t/filtering-image-based-on-users-profile/69358
**Category:** Ask for Help
**Created:** [January 8, 2024, 2:02pm UTC](https://community.glideapps.com/t/filtering-image-based-on-users-profile/69358 "2024-01-08T14:02:49Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![YannHill](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yannhill/32/68834_2.png) [@YannHill](https://community.glideapps.com/u/YannHill)
#### Post date: [January 8, 2024, 2:02pm UTC](https://community.glideapps.com/t/filtering-image-based-on-users-profile/69358/1 "2024-01-08T14:02:49Z")

</div>

Hi guys,  
I am new to glide. I am trying to create a tool for rental host.  
I have " property owner " and " Villa " tables.  
In the layout I would like the " property owner " who is also in the User table, to only see his Villas pictures.  
So I’ve added a Grid component displaying all the villas that are in " property owner " table.  
But I don’t how to filter it so Owner A can only see his.  
Need help

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [January 8, 2024, 2:12pm UTC](https://community.glideapps.com/t/filtering-image-based-on-users-profile/69358/2 "2024-01-08T14:12:56Z")

</div>

Create a relation in the owner table linking the owner to the villas table. Then you should be able to set the source if the collection to be the relation.

---

<div class="post-metadata">

### Author: ![YannHill](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yannhill/32/68834_2.png) [@YannHill](https://community.glideapps.com/u/YannHill)
#### Post date: [January 8, 2024, 2:36pm UTC](https://community.glideapps.com/t/filtering-image-based-on-users-profile/69358/3 "2024-01-08T14:36:44Z")

</div>

Hi Jeff ! thanks for helping 🙏🏽

I did it already. The component actually links to " lookup\_pics\_villa " on Villa owner table , but it displays every owners villa pics.  
I tried many things to filter down

 ![Image 08-01-2024 at 10.30](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/4/240541380682f10692c7e6bc94a6021936799742.jpeg)

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [January 8, 2024, 3:15pm UTC](https://community.glideapps.com/t/filtering-image-based-on-users-profile/69358/4 "2024-01-08T15:15:07Z")

</div>

Unless I’m missing something, shouldn’t the grid be sourced from the relation?

---

<div class="post-metadata">

### Author: ![YannHill](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yannhill/32/68834_2.png) [@YannHill](https://community.glideapps.com/u/YannHill)
#### Post date: [January 8, 2024, 3:24pm UTC](https://community.glideapps.com/t/filtering-image-based-on-users-profile/69358/5 "2024-01-08T15:24:03Z")

</div>

When I click on " source " I only have “main table list”. I can’t dive into it and select relations. Then inside the " items data" it automatically retrieve " lookup\_pics\_villa

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [January 8, 2024, 3:25pm UTC](https://community.glideapps.com/t/filtering-image-based-on-users-profile/69358/6 "2024-01-08T15:25:54Z")

</div>

Is the screen itself connected to a user row?

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [January 8, 2024, 3:27pm UTC](https://community.glideapps.com/t/filtering-image-based-on-users-profile/69358/7 "2024-01-08T15:27:20Z")

</div>

> [@YannHill](#):
>
> When I click on " source " I only have “main table list”. I can’t dive into it and select relations.

Scroll all the way to the end of the table list. You should see your relation there.

---

<div class="post-metadata">

### Author: ![YannHill](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yannhill/32/68834_2.png) [@YannHill](https://community.glideapps.com/u/YannHill)
#### Post date: [January 8, 2024, 3:46pm UTC](https://community.glideapps.com/t/filtering-image-based-on-users-profile/69358/8 "2024-01-08T15:46:19Z")

</div>

i don’t, just the main tables

---

<div class="post-metadata">

### Author: ![YannHill](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yannhill/32/68834_2.png) [@YannHill](https://community.glideapps.com/u/YannHill)
#### Post date: [January 8, 2024, 3:47pm UTC](https://community.glideapps.com/t/filtering-image-based-on-users-profile/69358/9 "2024-01-08T15:47:59Z")

</div>

the screen itself is connected to user table  
Then i have added components to make it a homepage

 ![Image 08-01-2024 at 11.29](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/a/9a1bb0558137c81179dd78df36c0a19fe5a5cf87.jpeg)

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [January 8, 2024, 3:54pm UTC](https://community.glideapps.com/t/filtering-image-based-on-users-profile/69358/10 "2024-01-08T15:54:20Z")

</div>

You are showing that the grid itself is connected to the user table, but I can’t tell from your screenshot which table the screen is connected to.

If everything is set up correctly, I believe your Home screen/tab should be connected to the user table and should be filtered to the signed in user. Then when you add a collection you should see the relation as an option for the source of your grid collection.

---

<div class="post-metadata">

### Author: ![YannHill](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yannhill/32/68834_2.png) [@YannHill](https://community.glideapps.com/u/YannHill)
#### Post date: [January 8, 2024, 4:01pm UTC](https://community.glideapps.com/t/filtering-image-based-on-users-profile/69358/11 "2024-01-08T16:01:19Z")

</div>

![Image 08-01-2024 at 11.59](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/f/cfb478036e547551ddceabd0fb755fb0e506681d.jpeg)

---

<div class="post-metadata">

### Author: ![YannHill](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yannhill/32/68834_2.png) [@YannHill](https://community.glideapps.com/u/YannHill)
#### Post date: [January 8, 2024, 4:11pm UTC](https://community.glideapps.com/t/filtering-image-based-on-users-profile/69358/12 "2024-01-08T16:11:40Z")

</div>

I may have missed something while creating User Table. I have added the "villa owners " as " users " so I can be in their shoes while checking their properties.  
The Home screen is linked with “user table”.  
But i am a bit lost regarding the " sign-in " part. is it related to " privacy setting " ?

---

<div class="post-metadata">

### Author: ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)
#### Post date: [January 8, 2024, 4:19pm UTC](https://community.glideapps.com/t/filtering-image-based-on-users-profile/69358/13 "2024-01-08T16:19:09Z")

</div>

> [@YannHill](#):
>
> But i am a bit lost regarding the " sign-in " part. is it related to " privacy setting " ?

Optional, required or no sign-in are indeed related to your privacy settings. Here is Darren’s chart to give you an overview.

 ![glide-privacy-flowchart](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/f/df23fc6ce1a95acf53e4b486f7df0229f079bb4c.png)

> [@YannHill](#):
>
> In the layout I would like the " property owner " who is also in the User table, to only see his Villas pictures.

As for the visibility of items in the Villa table, if these items only need to be viewed by their owner and nobody else ever, I think I would first have applied row ownership in the Villa table to filter data at the data level. This would improve performance.

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [January 8, 2024, 4:47pm UTC](https://community.glideapps.com/t/filtering-image-based-on-users-profile/69358/14 "2024-01-08T16:47:30Z")

</div>

I was under the assumption that the Proprietaire table WAS the User table. That’s why you don’t see the relation. Your screen is attached to the user table, which does not have that relation. You either need to change the source table for the screen, or add the relation to the user table, or do as @nathanaelb say and just use Row Owners (but only if data will never be shared with different users).

---

<div class="post-metadata">

### Author: ![YannHill](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yannhill/32/68834_2.png) [@YannHill](https://community.glideapps.com/u/YannHill)
#### Post date: [January 8, 2024, 5:01pm UTC](https://community.glideapps.com/t/filtering-image-based-on-users-profile/69358/15 "2024-01-08T17:01:54Z")

</div>

it works 🙏🏽  
Proprietaire became User Table and magic happened lol  
Thank you guys ! @nathanaelb and @Darren_Murphy too !

I will be back soon i guess 😅

---

<div class="post-metadata">

### Author: ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)
#### Post date: [January 8, 2024, 5:32pm UTC](https://community.glideapps.com/t/filtering-image-based-on-users-profile/69358/16 "2024-01-08T17:32:18Z")

</div>

Ah, apparently the Propriétaire table wasn’t set up for user profiles from the beginning 😅

If the users in your Propriétaire table never ever need to see each other’s data (just like we both have Gmail accounts, I assume, but you are not to see my emails and I am not to see yours), then you might consider setting up [row ownership](https://www.glideapps.com/docs/essentials/security-and-user-data/row-owners) in the tables other than Propriétaire so the data stays strictly segregated.

See you soon and welcome to Glide’s community forum.

---

<div class="post-metadata">

### Author: ![\_Romieux](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/_romieux/32/83089_2.png) [@\_Romieux](https://community.glideapps.com/u/_Romieux)
#### Post date: [January 11, 2025, 3:08pm UTC](https://community.glideapps.com/t/filtering-image-based-on-users-profile/69358/17 "2025-01-11T15:08:50Z")

</div>

Hi,  
Can someone post a similar exemple app or video because i have a similar problem that I can’t fix, i don’t see where my problem are with relations. In my case the images data are not strictly segregated the users can see images from others,
