Interactive Filter setup to show specific choices for task type
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2017 10:52 AM
Is there a way to setup interactive filters to only show specific task types? I only need to show a list of about 5 different task types. I have set up the interactive filter as a choice list, but I shows all task types in the drop down. I see there is an exclusions list, but that is adding a lot of exclusions to narrow down the scope to 5 types.
Thanks!
Alex
- Labels:
-
Analytics and Reports
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2018 06:40 AM
Hi Alex,
Did you ever find a way to accomplish this? I was looking to shrink the list myself and also activate some items by default. The only way I could see doing this is creating dummy sys_choice values for the missing task types. I don't want to necessarily go down this path as I'm not sure what else this could impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2018 08:47 AM
yoi need a custom interactive filter. Please have a look at this video:
the code for the content block:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<!-- By Arnoud Kooi Check https://youtu.be/I2eDVi9CAWI -->
<g:evaluate var="jvar_tasktypes" object="true" jelly="true">
var tables = 'incident,problem,change_request';
var obj=[];
var gr= new GlideRecord('sys_db_object');
gr.addEncodedQuery('super_classISNOTEMPTY^ORname=task^nameIN' + tables);
gr.addOrderBy('name');
gr.query();
while(gr.next()){
obj.push([gr.getValue('name'),gr.getValue('label')]);
}
obj;
</g:evaluate>
<select id='filter_task_type' class='select2-search' onchange='filterTaskType()'>
<option value="">All</option>
<j:forEach var="jvar_tasktype" items="${jvar_tasktypes}">
<option value="${jvar_tasktype[0]}">${jvar_tasktype[1]}</option>
</j:forEach>
</select>
<script>
var dbh = new DashboardMessageHandler("filter_tasktype");
function filterTaskType(){
var taskType = $j('#filter_task_type').val();
if (taskType)
dbh.publishFilter('task','sys_class_name=' + taskType);
else
dbh.removeFilter();
}
filterTaskType();
</script>
</j:jelly>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2023 08:59 AM
I’m having an issue with this code I’m in Tokyo and it will work until you change tabs then it stops working until you uncheck and recheck the widget to interactive with filters.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2023 05:50 AM
Hi @Keith Hnasko I am also having issues using this same Script in Tokyo - experiencing exactly the same issue that you mention. Just wondering have you managed to get this working or found a solution so this works in Tokyo release, by any chance?
Many thanks kind sir.
