Create a database view to show Roles granted by Group including all contains roles within

Adheshwar1
Tera Contributor

Hello all,

 

    I am new to Database views and would like to learn how to create database view that shows Groups and roles and contains roles. We want to show Roles provided by group including all Contains roles within. Could you help me in creating one? We want to keep going into contains role until it does not have contain role

5 REPLIES 5

Shivalika
Mega Sage

Hello @Adheshwar1 

 

Isn't that just the list of all roles and groups ? How are you going to identify from list view if this role is contained in this role. I mean if it's a list of record  - how ? Contains roles is a related list and we add role there, and there is kind of parent child relationship but how are you getting this in list view ? 

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket. 

 

Regards,

 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY

Shivalika
Mega Sage

@Adheshwar1 what I mean is roles table and group table will be sufficient to show contains and contains data - parent or some field is there - need to check. 

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket. 

 

Regards,

 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Adheshwar1 

 

A group can have multiple roles, and these roles can inherit multiple other roles (which may be the same or different). When a group is assigned to a user, an entry is added to the audit history table, but there’s no way to determine which role was assigned because the roles come from the group, not directly."

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

AndersBGS
Tera Patron
Tera Patron

Hi @Adheshwar1 ,

 

Can you please clarify "show Roles provided by group including all Contains roles within" - what do you mean by "contains roles within"?

 

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/