From de926af2f48343635813c5a7b778147c4d7c9aa3 Mon Sep 17 00:00:00 2001 From: Divya <165976969+divyajetti9@users.noreply.github.com> Date: Tue, 14 Oct 2025 12:44:01 -0500 Subject: [PATCH 1/2] README.md --- .../Auto-Fill Assignment Group Based on Category/README.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Client-Side Components/Client Scripts/Auto-Fill Assignment Group Based on Category/README.md diff --git a/Client-Side Components/Client Scripts/Auto-Fill Assignment Group Based on Category/README.md b/Client-Side Components/Client Scripts/Auto-Fill Assignment Group Based on Category/README.md new file mode 100644 index 0000000000..88b5a99c9f --- /dev/null +++ b/Client-Side Components/Client Scripts/Auto-Fill Assignment Group Based on Category/README.md @@ -0,0 +1,7 @@ +This ServiceNow **Client Script** automatically assigns the **Assignment Group** based on the selected **Category** on the Incident form. +It helps to route incidents to the right support teams quickly, improving efficiency and reducing manual errors. + +Script Type +**Type:** onChange +**Applies to Table:** `incident` +**Field Name:** `category` From 436d1b18f5737f8d474cd6f214c33a393327535d Mon Sep 17 00:00:00 2001 From: Divya <165976969+divyajetti9@users.noreply.github.com> Date: Tue, 14 Oct 2025 12:50:25 -0500 Subject: [PATCH 2/2] script.js --- .../script.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Client-Side Components/Client Scripts/Auto-Fill Assignment Group Based on Category/script.js diff --git a/Client-Side Components/Client Scripts/Auto-Fill Assignment Group Based on Category/script.js b/Client-Side Components/Client Scripts/Auto-Fill Assignment Group Based on Category/script.js new file mode 100644 index 0000000000..66bdfffd17 --- /dev/null +++ b/Client-Side Components/Client Scripts/Auto-Fill Assignment Group Based on Category/script.js @@ -0,0 +1,11 @@ +function onChange(control, oldValue, newValue) { + if (newValue == 'hardware') { + g_form.setValue('assignment_group', 'Hardware Support'); + } else if (newValue == 'software') { + g_form.setValue('assignment_group', 'Software Support'); + } else if (newValue == 'network') { + g_form.setValue('assignment_group', 'Network Team'); + } else { + g_form.clearValue('assignment_group'); + } +}