- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2019 07:36 PM
I am on Kingston. I started out with the intention of using a script include to filter for a array of ticket sys_id's. However, I'm testing out using a very simple script (literally just returning a single string which is an existing sys_id, at this point) and I'm not able to get a search or report to filter by what the script returns:
The script include:
The Script Include ReturnSysIds has a function called getmysysids() that simply returns a static string. The string is a sys_id of an existing TASK in my environment. The script include is in the Global application, is Active and is Client callable.
The search:
I have tried to use this script include in a search filter in the task table with javascript:getmysysids() in the filter. Upon clicking "run", no search results are returned, and I can see the filter has evaluated to NULL. I experience similar behaviour if I try to use the script include in a report instead of a search.
And just to confirm that that sys_id does exist:
Other things I tried:
- Using the IS condition for the sys_id filter (instead of IS ONE OF)
- Setting javascript:new ReturnSysIds.getmysysids() as the filter value
- Trying with and without the semicolon at the end
None of the above has worked. Any help/suggestions would be welcome!
Solved! Go to Solution.
- 4,158 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2019 10:38 PM
The Script Include name you have defined is "ReturnSysIds" and the function is name as "getmysysids()".
It is mandatory to to have your Script Include name and function name should be same.
Mark it as correct/helpful if this helps you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2019 08:55 PM
Make sure your script include name and function name is same.
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2019 08:56 PM
hi
Try setting the value this way :-
javascript:new ReturnSysIds().getmysysids()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2019 10:38 PM
The Script Include name you have defined is "ReturnSysIds" and the function is name as "getmysysids()".
It is mandatory to to have your Script Include name and function name should be same.
Mark it as correct/helpful if this helps you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2020 06:08 AM
This post helped me. I was keeping the function name same as script name but it was not working.
On seeing screenshot here I realize that I should mark "Client Callable" true. This thing worked for me.
