- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2018 07:43 AM
Hi team,
In incident form I am having a "category" field as reference type .So based an category the "subcategory 1" and "sub category 2" will select.
But when I click the "category" value I am not able to see the "subcategory 1" and "sub category 2"
How to fix this??
Regards,
Gokulraj S
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2018 10:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2018 08:17 AM
Use this as the reference qualifier
javascript: new getSubCategoriesSI().getSubCategories(current.getValue('u_category'))
This is your script include, in this case the name of script include is getSubCategoriesSI
function getSubCategories(category) {
var answer = [];
var subcat = new GlideRecord('your_subcategory_table');
subcat.addQuery('sys_id', category);
subcat.query();
while (subcat.next()) {
answer.push(subcat.getValue('sys_id'));
}
return 'sys_idIN' + answer.join(',');
}
Haven't tried the code so there might be some errors in it, but should work something like that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2018 10:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2018 10:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2018 11:01 AM
Great ,It works perfectly.Nice job!!!!!!!!!!!!!!!!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-09-2020 06:10 AM
Could you please show how this is done?