Hi, I have a requirement to show the list of roles for a User based on UserId( This I am able to achieve using Check...Role() function .)

Problem is when I add new Role to my module, I don't want to do changes in the code manually to check for an  new Role.


Is there any way that we can check this Role dynamically.

Hey,

You have a couple of System tables that can show you the information you need (you can add them by going to your references and selecting System).

The Role entity will give you a list of Roles for your environment:

You can get your Espace_Id by going to the Espace entity:

And finally, you can always just look at the User_Role table, and that will tell you what Roles a User has:

Solution

Hi Harshavardhan t,

If you don't want to use checkrole fuction you can use an aggregate with sources as user, role and user_role as shown below:



You can apply filters to this aggregate as well. 


This will make the role checking dynamic.


Regards,

Manthan Shah.

Solution

Thanks Manthan Shah,

Its working now..