12
Views
3
Comments
Solved
Wanting to show employees and admins in different tables

Assuming I have to types of users Admins and Employees, I am using the User entity to have all their attributes. My goal is to have two tables in which I show the employees and the admins. How may I filter them?

2026-01-28 16-57-48
Mihai Melencu
Champion
Solution

Hello @Helga Afonso ,

You will need to use the Users, User_Effective_Role and Role entities from System.

Your aggregate should have all 3 entities in it:


Then for the filters, you should filter after the Role name and the Module (espace) they're defined in.


In my case, I used the current module ID as I defined the roles in the same module.

I also attached an example OML.

RoleTables.oml
2026-02-16 05-51-10
Sahana K

Hi @Helga Afonso ,
Please find the attached oml ,for your requirement i have attached the oml,



Thanks,
sahana

Employyerole.oml
2025-02-10 08-07-05
Sudha Narayanan

Hi,

Create a separate static entity for Usertype (For Ex: Employee,Admin ).If u have a User Exetension entity,refer that UserTypeId. When You creating the user also select that User type .In table,call the aggregate and used this filter for Admin

UserExtension.Usertype = Entities.Usertype.Admin.

For Employee,

UserExtension.Usertype = Entities.Usertype.Employee.

based on this condition we can show the separate list for both users.

This is just for identify the users,additionally we can also create the roles for these users based on role entity.

Thanks!

Sudha Narayanan

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.