Count of Licenses from signed in email

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?

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.

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

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.

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:


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

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.

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

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.

count if the user has multiple licenses in the same app

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.

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

1 Like

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?

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.

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

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.