NA Subcategory Added Automatically in Record Producer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello Community,
In my Record Producer, when I select an Incident Type, the corresponding Incident Subcategories are displayed correctly.
However, I’ve noticed that the last subcategory ("NA") is always being added automatically to the list of selected subcategories
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
how is the dependency handled currently?
share the screenshots or script
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
try this
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading) return;
var allSubcats = [
'authentication_issues', 'user_management', 'security_errors',
'data_feeds_transactions', 'interface_failures', 'travel_external_integrations',
'payroll_accounting', 'rates_allowances', 'settlement_vat',
'approval_flows', 'compliance_sampling', 'workflow_issues',
'performance_stability', 'reporting_configuration', 'ui_mobility',
'expense_capture', 'receipts_attachments', 'cash_advances',
'email_delivery', 'content_formatting', 'notification_settings', 'na'
];
allSubcats.forEach(function(f) {
g_form.setDisplay(f, false);
g_form.setValue(f, false); // Deselect
});
// Always clear the Subcategory variable value
g_form.setValue('incident_subcategory', '');
if (!newValue) {
// Optionally display default or 'none' field if needed here
return;
}
var subcategoryMap = {
'Login & Access': ['authentication_issues', 'user_management', 'security_errors'],
'System Connections & Integrations': ['data_feeds_transactions', 'interface_failures', 'travel_external_integrations'],
'Payments & Calculations': ['payroll_accounting', 'rates_allowances', 'settlement_vat'],
'Approvals & Workflow': ['approval_flows', 'compliance_sampling', 'workflow_issues'],
'App Performance & Usability': ['performance_stability', 'reporting_configuration', 'ui_mobility'],
'Expenses & Receipts': ['expense_capture', 'receipts_attachments', 'cash_advances'],
'Emails & Notifications': ['email_delivery', 'content_formatting', 'notification_settings'],
'Other': ['na']
};
if (subcategoryMap[newValue]) {
subcategoryMap[newValue].forEach(function(f) {
g_form.setDisplay(f, true);
});
}
}
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Not working
