Add User criteria to HR case report.

VeeruG7
Tera Contributor

Hi Experts,

 

I am having a requirement that need to create a report of unassigned HR cases.

And I will make this report to available on HR Agent Dashboard. Here the issue is report need to show the unassigned cases of the logged in Agent region(Location/Country).

 

I tried creating a normal report but not able to customize report on Agent region. Can you pls advice any feasibility for this?

3 REPLIES 3

Hemanth M1
Giga Sage
Giga Sage

Hi @VeeruG7 ,

 

You can do this by passing logged user location name from the report filter using javascript and create a client callble script include to return logged in user location.

 

ex: get logged in user location name from the script include 

 getLocation: function() {
        var userlocation = gs.getUser().getRecord().getValue('location');
        var location = new GlideRecord("cmn_location"); //get name from the location sys_id
        if (location.get(userlocation)) {
            return location.name.toString(); //retutn location name
        }

HemanthM1_0-1697094609387.png

2)use javascript filter on the report:

HemanthM1_1-1697094665027.png

 

in this example Able Tuter has the same location as logged in user show it displaying all the incidents where caller location name as logged in user location

 

same way you can build on HR case record

 

let me know if any questions.

Accept and hit Helpful if it helps.

Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025

VeeruG7
Tera Contributor

Hello Hemanth, Thanks for reply.

VeeruG7_0-1697095174197.png

In the filter condition not able to write any code, by the way the regional location field is choice type.

 

Hi @VeeruG7 ,

 

Do you have a string field on the location?? which is this refering to is it "cmn_locaton" ??

 

Can you try subject persion.location.name

 

you can write it on the string field.

Accept and hit Helpful if it helps.

Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025