Simple List Filter User Department in Employee Center
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2024 02:24 AM
Hello,
I would like to set a simple list filter in the Employee Servicecenter to see the tickets of own department.
That's why I had the idea of filtering the simple list by department. It is important that it includes all tasks. This means I need the task table [task]. I built the filter with:
incident => Affected_user.department.id = javascript:gs.getUser().getDepartmentID();
OR
change_request.department.id => Requested_by = javascript:gs.getUser().getDepartmentID();
OR
sc_req_item requested_for.department.id = javascript:gs.getUser().getDepartmentID();
But it doesn't work. Can anyone here help? Thanks a lot!
BR Stefan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2024 02:58 AM
What exactly isn't working? Is the filter not filtering anything, or is it more related to not being able to see the tickets from others (like ACL's that only show 'opened_by is dynamic me'.
If this isn't the issue, I think you need to filter on 'task type = table' instead of the table names and also validate that the fields you use are available on the task table (since you are querying from there). Is 'affected_user' a task field, or an incident field?
Otherwise you need to query on each table, get the records and push them into you list.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2024 03:03 AM
Hello Mark,
Filtering is not working. I would like to filter all tasks that are from the same department as the logged in user.
u_affected_user is a field on incident (similar to caller).
How do you think I should set the filter on the [task] table to see all tickets created from "dynamic my" department?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2024 04:32 AM
If you want the 'created_by' you can just filter on the 'opened_by' from task. That's a field used in all tasks.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark