Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Extracting only the hr profiles users from all the users (sys_user) list

poornima batchu
Tera Expert

HI everyone, 

I'm trying to extract a list of users having access to hr profile from all the users list and one more is How to create a query or any report where I can find people having access to hrsd which means having hr profile but created cases in the ITSM side.

please help me to create a report 

Thank you

 

4 REPLIES 4

quentin_gillet
ServiceNow Employee

Hello,

 

I think the easiest would be to create a database view joining Users, HR Profiles and Incident tables. You will need to be careful when joining to ensure you filter out the user without a profile.

 

https://docs.servicenow.com/en-US/bundle/tokyo-platform-administration/page/use/reporting/concept/c_...

 

You can then use the database view to create the report.

 

Good luck!

Ankur Bawiskar
Tera Patron

Sorry your question is confusing.

What's your exact business requirement?

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

Ankur Bawiskar
Tera Patron

@poornima batchu 

are you saying you want only those users from sys_user who have HR Profiles?

If yes then below report will help you

Condition will be Related List Condition

HR Profile.User

Equal to 1

 

AnkurBawiskar_0-1664873603155.png

 

AnkurBawiskar_1-1664873623123.png

 

 

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

Vishnu Prasad K
Giga Guru

Hi Poornima,

 

For the first requirement you can report on sys_user_has_role table for the users with hr related roles (Please check what role is required for viewing the profile) and since user is a referenced field in the role table, you can directly dot walk to user table

For the second use case, you should create a database view combining sys_user_has_role and incident table. Condition will be incident.caller = sys_user_has_role.user && sys_user_has_role.role = hr role mentioned above, make sure you correct the syntax