The CreatorCon Call for Content is officially open! Get started here.

Create a Database View to Display Licensed Roles Against Active Users

appstorm
Tera Contributor

Trying to create a database view to display active users within the system who have logged-in within the last 3 months and are assigned licensed roles.

 

Screenshot 2025-10-02 140936.png

 

I would think the where clause should use the 'name' field from the license_role table to join with the 'role' field on the sys_user_has_role table.  Then, it would just be a matter of setting the filters on the report to show where active = true && logged-in ❤️ months?

2 REPLIES 2

Rafael Batistot
Kilo Patron

Hi @appstorm 

Database view with 3 tables

  1. sys_user_has_role
  2. license_role
  3. sys_user

Joins:

  1. sys_user_has_role.role = license_role.name

  2. sys_user_has_role.user = sys_user.sys_id

 

 

Thank you!  So, the prefixes defined in the database view would be included, also?Screenshot 2025-10-02 151349.png