module argument to list cases by user company and/or location

lwatts
Kilo Contributor

Hi,

 

I am trying to create a module for specific user that list all hr cases and hr tasks for  their location.  I have created a group and a role for these users and and assigned hr case reader and hr task reader roles.  The individuals in this group are at different locations/companies and I want them to only be able to view for their location.  I have tried a couple of arguments I found online but they have not been successful.

 

Does anyone have any suggestions to get this to work?  

Link type:  List of records

Table:  Task

Filter:  Active is true or false

   Task type is HR Case or HR Task

Arguments:  company = javascript:gs.getUser().getRecord().getValue('company')

 

Thanks,

 

Lorenzo

1 ACCEPTED SOLUTION

tolga1
ServiceNow Employee
ServiceNow Employee

hi lorenzo


i would propose to do this with ACLs. The thing with configuring a list view is, that the records would still be all available for all users (via search or via modifying the filter). If you configure an ACL for this, the records are strictly restricted to the relevant role.



Read here how to set up such ACL rules: Create an ACL rule



Be careful, modifying ACLs require some experience.



Best Regards


View solution in original post

5 REPLIES 5

PrashantLearnIT
Giga Sage

Hi Lorenzo,



You can just provide role for visibility.



Mark Helpful if it helps.


********************************************************************************************************
Please appreciate the efforts of community contributors by marking the appropriate response as the correct answer and helpful. This may help other community users to follow the correct solution in the future.

********************************************************************************************************
Cheers,
Prashant Kumar
ServiceNow Technical Architect


Community Profile LinkedIn YouTube Medium TopMate
********************************************************************************************************

Hey Prashant,



I don't quite understand what you mean by "just provide role for visibility".





Lorenzo Watts


System Administrator I


University System of Georgia Shared Services Center


1005 George J. Lyons Pkwy


Sandersville, GA 31082


www.ssc.usg.edu<http://www.ssc.usg.edu/>


Ph. (478) 240-6500 / Fax (478) 240-6414


lwatts@ssc.usg.edu<mailto:lwatts@ssc.usg.edu>


Any other thoughts on how to accomplish this.



Thanks



Lorenzo Watts


System Administrator I


University System of Georgia Shared Services Center


1005 George J. Lyons Pkwy


Sandersville, GA 31082


www.ssc.usg.edu<http://www.ssc.usg.edu/>


Ph. (478) 240-6500 / Fax (478) 240-6414


lwatts@ssc.usg.edu<mailto:lwatts@ssc.usg.edu>


tolga1
ServiceNow Employee
ServiceNow Employee

hi lorenzo


i would propose to do this with ACLs. The thing with configuring a list view is, that the records would still be all available for all users (via search or via modifying the filter). If you configure an ACL for this, the records are strictly restricted to the relevant role.



Read here how to set up such ACL rules: Create an ACL rule



Be careful, modifying ACLs require some experience.



Best Regards