- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2015 08:24 AM
I am trying to using a onChange Client Script to clear the value of the Assigned To field when the Assignment Group changes. I tried to use the one that was posted on the messages, but it is not working.
Here is what I have:
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading) {
return;
}
if (newValue == ''){
g_form.setValue('assigned_to','');
}
}
This is not working, any suggestions?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2015 10:07 AM
Hi Vinay,
Below script will blank out the assigned_to field when the assignment group changes.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue == '') {
return;
}
var assGrp = g_form.getControl('assignment_group');
if(assGrp.changed)
{
g_form.setValue('assigned_to','');
}
//Type appropriate comment here, and begin script below
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2016 03:49 PM
Hey vigo, Do you remember what the right script was for this? I'm trying to do the exact same thing. Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2016 04:09 PM
Kimberly,
It would be an onChange client script on field "Assignment group" as below
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue == '') {
return;
}
if (newValue != '') {
g_form.setValue('assigned_to', '');
return;
}
}
Hope this helps!!
Suraj Chauhan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2016 04:23 PM
Thank you is this the best way to accomplish this task?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2016 04:37 PM
Also sorry I am new to this. This wouldn't be a UI policy would it? Where would this script fall under.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2016 04:47 PM
This would be a client script. Table would be Incident.
Suraj Chauhan