Dynamic Filter Option with gs.getProperty()

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2019 02:14 AM
Hello,
Maybe someone can share some light on this case:
Requirement: Filter the list of incidents (Report on Dashboard) based on assignment group sys_id kept in a system property.
Solution: Create a Dynamic Filter option
Problem: Filter returns empty when gs.getProperty() is used in Script Include.
Script Include code (:
function GetDefaultGroup() {
return gs.getProperty('test.group');
}
Dynamic Filter Option Configuration:
Result:
Additional information:
- Additional information: Checked with hardcoded sys_id in the script include, it works.
- Checked configuration without script include and used gs.getProperty() directly, it does not work.
Anyone has an idea how to solve it?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2019 02:26 AM
Do we really need to create a dynamic filter for a single group? Can't you just create a normal filter with visibility as everyone and save it?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2019 02:33 AM
Hi,
Forgot to mention that the list of incidents is a report used on a Dashborad. The group can be changed but it can not be done by changing the report configurtion.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2019 03:07 AM
This may be a bug. When I tried the same on my instance, the script include does not work when I use system property but the same script works when I hardcode a group sys id.
Can you try hardcoding the sysid and see if the script works?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2019 05:30 AM
Already tried it (have written it in my question at the end). When sys_id is hardcoded it works when using property it does not. I am wondering if the issue is with the fact that the filter is applied on client-side and getProperty is not. Although the script is Client Callable it does not use the GlideAjax.