Skip to content

Commit 20e7fca

Browse files
README.md
1 parent 126f76c commit 20e7fca

File tree

1 file changed

+14
-0
lines changed
  • Server-Side Components/Script Includes

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Department Filter – Show Only Users from Same Department
2+
3+
This Script Include is configured to filter users based on the department of the currently logged-in user.
4+
5+
It can be used in a **Reference Qualifier** to ensure that the Caller (or any user reference field) displays only users belonging to the same department as the logged-in user.
6+
7+
### 📘 Table
8+
- `sys_user` (to fetch users)
9+
- Used for reference fields such as `caller_id` in `incident`
10+
11+
### ⚙️ Script Include Overview
12+
- Name: `getSameDeptUsers`
13+
- Function: `getSameDept()`
14+
- Logic: Fetches all users whose `department` matches that of the current logged-in user.

0 commit comments

Comments
 (0)