# Find all the products of a certain user and combine them into user list

**URL:** https://community.glideapps.com/t/find-all-the-products-of-a-certain-user-and-combine-them-into-user-list/38138
**Category:** Ask for Help
**Created:** [February 5, 2022, 1:00am UTC](https://community.glideapps.com/t/find-all-the-products-of-a-certain-user-and-combine-them-into-user-list/38138 "2022-02-05T01:00:52Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![SuperMerabh](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@SuperMerabh](https://community.glideapps.com/u/SuperMerabh)
#### Post date: [February 5, 2022, 1:00am UTC](https://community.glideapps.com/t/find-all-the-products-of-a-certain-user-and-combine-them-into-user-list/38138/1 "2022-02-05T01:00:52Z")

</div>

Hello!

I am working on a membership app. I need to show some items only to people who bought a certain membership, I have 2 types of memberships (“training” and “membership”). Everything is working except I need a way to look for all the membership types a user bought and combine them into one cell ON user table. I tried to do it with Glide tables, it worked but then I couldn’t use the info on the visibility condition. So now I want to do it with Google Sheets.

I have App: Sales table with all the info

 ![Screen Shot 2022-02-05 at 8.53.48 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/e/2e803a7d662512042fc6e01731429ca5fcbfb993.png)

And then I have a users table with a column “Access” where I want to find all the products the user bought and combine then like this

 ![Screen Shot 2022-02-05 at 9.02.14 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/6/0652665b170965538f21e26c0c10587715b41a53.png)

Any help is appreciated!  
@ThinhDinh @Robert_Petitto

Thank you!

---

<div class="post-metadata">

### Author: ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)
#### Post date: [February 5, 2022, 1:09am UTC](https://community.glideapps.com/t/find-all-the-products-of-a-certain-user-and-combine-them-into-user-list/38138/2 "2022-02-05T01:09:10Z")

</div>

In the Glide table, You can use the relation column, to relate the user’s table email addresses to sales email addresses (mark multiple), then lookup that relation for membership, it will bring joined cell of all the memberships purchased by a member.

In google sheets… use the sort and vlookup functions

 ![Screen Shot 2022-02-04 at 9.54.13 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/4/848d75c6eeb16bd04a0343becc804f0b1dbd89d0.jpeg)

I assume that you are most interested in the current status of membership… not to join purchases.

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [February 5, 2022, 9:46am UTC](https://community.glideapps.com/t/find-all-the-products-of-a-certain-user-and-combine-them-into-user-list/38138/3 "2022-02-05T09:46:51Z")

</div>

> [@SuperMerabh](#):
>
> Everything is working except I need a way to look for all the membership types a user bought and combine them into one cell ON user table. I tried to do it with Glide tables, it worked but then I couldn’t use the info on the visibility condition.

I wondered what “did not work” here? It looks like you have the right setup and the only problem should be the visibility conditions. Can you share the problem?

If you have the same setup with your own “Sales” table then with Glide Tables:

- Create a relation using the email of the user as the connector, from your Users sheet to the Sales sheet.

- Use a joined list column on top of the relation above to return all “Item SKUs” to know which types of membership a user has bought.

It should be the same with Sheets, except you have to “duplicate” the App: Sales table by a formula to make it visible to Glide, if you want to do the relation way.

If you want it to be a Sheet column with an arrayformula then I guess it’s more tricky. If you want it let me know.

---

<div class="post-metadata">

### Author: ![SuperMerabh](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@SuperMerabh](https://community.glideapps.com/u/SuperMerabh)
#### Post date: [February 7, 2022, 12:17am UTC](https://community.glideapps.com/t/find-all-the-products-of-a-certain-user-and-combine-them-into-user-list/38138/4 "2022-02-07T00:17:07Z")

</div>

> [@Uzo](#):
>
> In the Glide table, You can use the relation column, to relate the user’s table email addresses to sales email addresses (mark multiple), then lookup that relation for membership, it will bring joined cell of all the memberships purchased by a member.

Thank you! The issue was that I was not able to use the info on joined column in the visibility condition, it was just letting me choose empty/not empty

---

<div class="post-metadata">

### Author: ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)
#### Post date: [February 7, 2022, 1:42am UTC](https://community.glideapps.com/t/find-all-the-products-of-a-certain-user-and-combine-them-into-user-list/38138/5 "2022-02-07T01:42:19Z")

</div>

![Screen Shot 2022-02-06 at 8.19.03 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/d/5dbfa0bbdf890a79e675df009df3cb7e461e3316.jpeg)

this is weird maybe a bug… I was able to join multiple lookups in my app, but now… I tried to recreate that to make a sample for you… and I can’t do it anymore.  
so maybe you use technic as I show you for the spreadsheet… to just find the latest payment

but is working in the app… LOL

 ![Screen Shot 2022-02-06 at 8.52.44 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/5/35d54f7121f70b859fc182f7a02ba2978a442a13.png)  
 ![Screen Shot 2022-02-06 at 8.53.09 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/4/046f402076f8e7474237f9acc05e97ced261bbf8.png)

so try to join your lookup and then even if in editor is showing empty, in the app should work to filter it

---

<div class="post-metadata">

### Author: ![SuperMerabh](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@SuperMerabh](https://community.glideapps.com/u/SuperMerabh)
#### Post date: [February 7, 2022, 4:20am UTC](https://community.glideapps.com/t/find-all-the-products-of-a-certain-user-and-combine-them-into-user-list/38138/6 "2022-02-07T04:20:59Z")

</div>

> [@ThinhDinh](#):
>
> If you want it to be a Sheet column with an arrayformula then I guess it’s more tricky. If you want it let me know.

I found a way to do it with just two products, looking for first and last purchase, but it will only work with 2 products…I’ll post more details when I have it. Thank you @ThinhDinh !
