- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2024 09:11 PM
On incident form, populate the assignment group automatically when category is selected.
How to clearValue of assignment group field when category is None. using client script.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (newValue === '') {
g_form.clearValue('assignment_group');
}
g_form.setValue('assignment_group', '019ad92ec7230010393d265c95c260dd');
}
What changes I need to make so that assignment group field value is clear when selected category is none in incident table
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2024 09:45 PM
Hi @pk16514 Create a onchange client script on field "Category" and add the below script as per screenshot
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2024 09:25 PM
Hi there,
I suggest you use Assignment rules rather than creating a new client script for this. Please take a look at this article to get more details about Assignment rules.
If my answer helps, then please mark it correct.
Thanks,
Utpal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2024 09:27 PM
If you still want to use client script then you need to compare the value to either null or bank for category field to clear the value.
Replace your first IF statement with below:
if (newValue == '' || newValue == null) {
g_form.clearValue('assignment_group');
}
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2024 09:33 PM
HI @Utpal Dutta . Your scripting solution didn't work. Thanks for the response though.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2024 09:45 PM
Hi @pk16514 Create a onchange client script on field "Category" and add the below script as per screenshot
Harish