# Count of Licenses from signed in email

**URL:** https://community.glideapps.com/t/count-of-licenses-from-signed-in-email/7301
**Category:** Ask for Help
**Created:** [April 18, 2020, 11:40am UTC](https://community.glideapps.com/t/count-of-licenses-from-signed-in-email/7301 "2020-04-18T11:40:58Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![JoshuaRiley](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joshuariley/32/23639_2.png) [@JoshuaRiley](https://community.glideapps.com/u/JoshuaRiley)
#### Post date: [April 18, 2020, 11:40am UTC](https://community.glideapps.com/t/count-of-licenses-from-signed-in-email/7301/1 "2020-04-18T11:40:58Z")

</div>

So I’m building a licence manager, I have an apps sheet with a list of my apps, and a licences sheet which contains the signed in user’s email. Is there a way inside the app detail screen to get the count of licences that contains the signed in user’s email?

---

<div class="post-metadata">

### Author: ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)
#### Post date: [April 18, 2020, 12:46pm UTC](https://community.glideapps.com/t/count-of-licenses-from-signed-in-email/7301/2 "2020-04-18T12:46:27Z")

</div>

I’m guessing this is in relation to your other post about rolling up user specific columns. This would be an ideal case for that. For now, You would need a master sheet that has a list of all of the email addresses and the licenses assigned. Then, count by email address.

---

<div class="post-metadata">

### Author: ![JoshuaRiley](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joshuariley/32/23639_2.png) [@JoshuaRiley](https://community.glideapps.com/u/JoshuaRiley)
#### Post date: [April 18, 2020, 12:55pm UTC](https://community.glideapps.com/t/count-of-licenses-from-signed-in-email/7301/4 "2020-04-18T12:55:49Z")

</div>

How would I create an automatic master sheet, is that using an array formula and also how would I get the count into a template column based on the signed in user, the app sheet email column is the admin’s email so not the purchaser’s, the licence sheet has the app name and purchaser’s email column.

Best Regards,  
Joshua

---

<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: [April 21, 2020, 2:06am UTC](https://community.glideapps.com/t/count-of-licenses-from-signed-in-email/7301/5 "2020-04-21T02:06:33Z")

</div>

Does your apps sheet contain emails or does you license sheet contain apps asking with emails? Just trying to get a picture of your sheet structure.

---

<div class="post-metadata">

### Author: ![JoshuaRiley](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joshuariley/32/23639_2.png) [@JoshuaRiley](https://community.glideapps.com/u/JoshuaRiley)
#### Post date: [April 21, 2020, 12:38pm UTC](https://community.glideapps.com/t/count-of-licenses-from-signed-in-email/7301/6 "2020-04-21T12:38:16Z")

</div>

So the Apps sheet contains an email column but it’s my email as the admin as I have admin abilities in the glideapp using visibility. The Licences Sheet has:

 ![Screenshot 2020-04-21 at 13.35.38](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/c/c73027e100fa2a9615538195f7694aecade23214.png)  
So there is an email column for each user, I have a script that polls the App: Sales sheet and automatically adds a row on a new sale with the signed in user’s email. I want to some how get the count of licences based on the shown app detail screen and the signed in user, I currently have an App relation attached to this sheet.

Hopefully you understand better,  
Thanks,  
Joshua Riley

---

<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: [April 21, 2020, 12:44pm UTC](https://community.glideapps.com/t/count-of-licenses-from-signed-in-email/7301/7 "2020-04-21T12:44:38Z")

</div>

Since you already have a relation from the apps sheet to the license sheet, then all you should needed is a Rollup coming in the app sheet to count the number of matching rows in the relation column.

---

<div class="post-metadata">

### Author: ![JoshuaRiley](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joshuariley/32/23639_2.png) [@JoshuaRiley](https://community.glideapps.com/u/JoshuaRiley)
#### Post date: [April 21, 2020, 12:47pm UTC](https://community.glideapps.com/t/count-of-licenses-from-signed-in-email/7301/8 "2020-04-21T12:47:50Z")

</div>

Yes but I want it based on the signed in user as I have multiple signed in users and multiple apps and multiple licences so I want the count to be based on the app and also the signed in user matching the email column of the licences sheet

---

<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: [April 21, 2020, 12:53pm UTC](https://community.glideapps.com/t/count-of-licenses-from-signed-in-email/7301/9 "2020-04-21T12:53:03Z")

</div>

So you want a count if the user has multiple licenses in the same app, or a count for the number of apps a user has? Sorry, just trying to understand.

---

<div class="post-metadata">

### Author: ![JoshuaRiley](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joshuariley/32/23639_2.png) [@JoshuaRiley](https://community.glideapps.com/u/JoshuaRiley)
#### Post date: [April 21, 2020, 12:53pm UTC](https://community.glideapps.com/t/count-of-licenses-from-signed-in-email/7301/10 "2020-04-21T12:53:41Z")

</div>

count if the user has multiple licenses in the same app

---

<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: [April 21, 2020, 12:57pm UTC](https://community.glideapps.com/t/count-of-licenses-from-signed-in-email/7301/11 "2020-04-21T12:57:12Z")

</div>

Ok. In your license sheet, create a template that joins app name and email. Next create relation in the license sheet that uses that template and links back to itself in the same sheet. Then create a Rollup column against the relation to get your count.

---

<div class="post-metadata">

### Author: ![JoshuaRiley](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joshuariley/32/23639_2.png) [@JoshuaRiley](https://community.glideapps.com/u/JoshuaRiley)
#### Post date: [April 21, 2020, 12:58pm UTC](https://community.glideapps.com/t/count-of-licenses-from-signed-in-email/7301/12 "2020-04-21T12:58:14Z")

</div>

I’ll give that a go and let you know if it works, thanks

---

<div class="post-metadata">

### Author: ![JoshuaRiley](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joshuariley/32/23639_2.png) [@JoshuaRiley](https://community.glideapps.com/u/JoshuaRiley)
#### Post date: [April 21, 2020, 1:04pm UTC](https://community.glideapps.com/t/count-of-licenses-from-signed-in-email/7301/13 "2020-04-21T13:04:38Z")

</div>

Ok so that works, it gets it in the licences sheet but my quesion now is how do I reference in a rich text component inside the Apps detail sheet and also work with the current signed in user? How would a relation work that also checks based on the current signed in user as well as the app name?

---

<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: [April 23, 2020, 4:33am UTC](https://community.glideapps.com/t/count-of-licenses-from-signed-in-email/7301/14 "2020-04-23T04:33:59Z")

</div>

Maybe I need a better visual, but are you saying that you want each user to sign in, view all the apps, and then view their licences for each app, or just view the number of licenses they have for each app? There’s probably several way to approach this, so that’s why I need a better visual of what you’re asking.

---

<div class="post-metadata">

### Author: ![JoshuaRiley](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joshuariley/32/23639_2.png) [@JoshuaRiley](https://community.glideapps.com/u/JoshuaRiley)
#### Post date: [April 23, 2020, 2:18pm UTC](https://community.glideapps.com/t/count-of-licenses-from-signed-in-email/7301/15 "2020-04-23T14:18:37Z")

</div>

So I want to view the number of licenses they have for each app and have that number visible in the app detail screen

---

<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: [April 23, 2020, 5:44pm UTC](https://community.glideapps.com/t/count-of-licenses-from-signed-in-email/7301/16 "2020-04-23T17:44:09Z")

</div>

Well, the easiest might be to now create a relation in the app sheet that links to the license sheet. Then add an inline list on the app details screen that show the relation, but filtered to the signed in user. You could display the number in a simple list, or get fancy with tiles or cards.

If you don’t need to drill down to the license details from the the app details, then you can set the list action to nothing, so the list is only used for display only.

If you purely just need the number, then I would use a single relation. If you want to view any other license details for that user, then I would set the relation to multiple.
