Module only showing current user items

Edwin Fuller
Tera Guru

I need to create a new module/list of records that only displays items from the current logged in users department?

Does anyone know how to accomplish this ask?

Example: I logged into ServiceNow Self Service and click the "My Department Open" button. From there a list of records should appear showing only items related to my department.

Thanks.

1 ACCEPTED SOLUTION

Abhinay Erra
Giga Sage

Create a new module and in the Link type select the list of records, table and then in the conditions put


business_unit is javascript:gs.getUser().getDepartmentID();


View solution in original post

10 REPLIES 10

HugoFirst
Kilo Sage

One way is to make the module a list and filter it so that the caller is javascript:gs.user_id()



Here's one example:


find_real_file.png


To clarify - I'm looking to create a list of records that are related to my department



Example: I logged into ServiceNow Self Service and click the "My Department Open" button. From there a list of records should appear showing only items related to my department.


HugoFirst
Kilo Sage

Try   Assignment Group is javascript:getMyGroups().


Here's an example from a gauge used on one of my dashboards:



find_real_file.png


Abhinay Erra
Giga Sage

When you say items? What exactly are your referring to like incident, change etc.?