- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2020 02:40 PM
Our team wants to create a dynamic filter option that allows a someone to filter a list by the logged-in user's Department. We tried to follow the ootb Me filter, but couldn't get anything to work. In the script, we have
gs.getUser().getDepartmentID();
We chose field type String...though we tried to choose Reference, but the list of Reference Tables to choose from only had 6 available tables. We also checked Available for Filter as true.
Any suggestions on how we can get this to work?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2020 07:15 PM
I created it and worked fine for me with same script (see below)
Note: If user is logged in and has department like IT and if department is changed to let say HR, it will give IT as value until user logs off and log back in.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2020 07:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2020 05:46 AM
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2020 06:58 AM
Yes, gs.getUser().getDepartmentID(); doesn't work in scoped app but you can create it in global and call it from scoped app.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2020 05:23 AM
Hello,
Sorry for my question but did you need to write script in order to create the dynamic filter??
I need to filter by department but have no idea on how to write the script.. thanks for your help...
Juliette