- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2023 05:12 AM - edited 12-28-2023 05:18 AM
Hi all, When I set My Request Filter, I want to call script include in Flag filter condition ,but it not work , Is it possible to call script include in my request filter? Any help will be appreciated!
javascript: new global.showTeamsTicket.isMemberofGroup(gs.getUserID())
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2023 05:22 AM
Hi @Betty9
Yes, you can call script include in the filter.
Check other OOB filters, few filters are configured to run javascript code.
Below is one of the out of the box example using same.
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2023 06:29 PM - edited 12-28-2023 06:30 PM
@Betty9 I doubt if you would be able to check the flag status to true using
new global.showTeamsTicket.isMemberofGroup(gs.getUserID())
Essentially at the run time condition evaluates to one of the following.
Flag is true (when isMemberofGroup return true)
Flag is false (when isMemberofGroup return false)
In both the cases the condition builder will evaluate this condition to true and the incident would be shown in My Request section.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2023 11:34 PM
Thank for pointing it out, i want to chcek if loginuser belong to some group, Now I am consider to write group's sysid to Flag filed, and use script include to check, How about this solution? Do you have some suggesstion about this, Thanks advance!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2023 01:27 AM
@Betty9 Yes, ideally the flag field should store a sys_id and the script include should also return a group sys_id. Incident records will be shown if the sys_id matches and won't be shown if there is a mismatch.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2023 04:28 AM
I got it. Thank you very much!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2023 05:23 AM
Can you please share your retirement and did you check the script include function by calling it through background script?
Is it returning true/false when you pass logged In user sys_id?
Thanks
Anil Lande