Database view filters

AnthonyMull
Tera Contributor

Hi community

 

I would like to build a report based on the roles a user has and the type of the group the users are in.

 

I think I will use a database view, but I have 2 questions please.

 

1. Is database views the best approach here.

2. If using a database view, how can I filter the data on the view before building the report, for example if I join on the user sys_id of the both tables, how can I filter to say only show users that are active before the report

Thanks in advance

1 ACCEPTED SOLUTION

Philippe Casidy
Tera Guru

Hi @AnthonyMull ,

 

Yes, I think this database view exists ootb:

/sys_db_view_list.do?sysparm_query=nameLIKEskill

  • Skills By Category

  • Users By Skill Category

  • User Skills By Group

  • User Group Skills

 

View solution in original post

5 REPLIES 5

Ankur Bawiskar
Tera Patron

@AnthonyMull 

I agree with @Philippe Casidy 

check these out of the box database view "User Group Skills"

it joins your relevant tables

55.png

also check below

Reporting on users with roles in groups 

all users groups and roles in single report 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader