Creating a Dynamic Filter for HR SKills
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
35m ago
Hi all,
I'm trying to give agents a filter that reads "show me cases tagged with any of the skills on my own user record" — essentially a dynamic filter 'Skills is one of my skills'. The operator does appear on the Skills field, so the option is binding. But after running the filter on a case list, the value renders null instead of One of My Skills. This happens for users with multiple skills, and in both native UI and Agent Workspace.
the setup of skills field is:
Property Value
| Table | task (filtering child sn_hr_core_case) |
| Field | skills |
| Type | glide_list |
| Reference | cmn_skill |
with the following script include:
var MySkillsFilter = Class.create();
MySkillsFilter.prototype = {
initialize: function() {},
getMySkills: function() {
var skills = [];
var gr = new GlideRecord('sys_user_has_skill');
gr.addQuery('user', gs.getUserID());
gr.addQuery('active', true);
gr.query();
while (gr.next())
skills.push(gr.getValue('skill'));
return skills.length ? skills : ['-1'];
},
type: 'MySkillsFilter'
};
The dynamic filter option record all looks correct, i believe the issue lies with the script include. Any guidance is greatly appreciated!
Labels:
- Labels:
-
Human Resources Service Delivery
0 REPLIES 0
