- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-17-2015 06:32 PM
Hello guys I am trying to do this:
- Every time the Configuration Item changes on the Incident form, the value of the Assignment group field should default to the value of the Support group from the selected Configuration Item. The change should be reflected immediately on the form allowing the user to change it manually before submitting the form and it needs to be achieved by using client scripts .I did this: but I dont get it to work!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2015 12:28 AM
Hey Kalaiarasan P thank you very much! I really appreciate a lot your help though I used this!
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading)
return;
var group = g_form.getReference('cmdb_ci', setGroup);
}
function setGroup(group) {
if (group)
g_form.setValue('assignment_group', group.support_group);
}
And it worked! but seriously! Thank you very much! you helped me understand!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-17-2015 09:53 PM
Remove the third if block and check
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-17-2015 10:07 PM
Hello Kalaiarasan P, thanks for the answer, and nop! 😕 it still dont work just with the reamaing if like this:
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading)
return;
if (newValue == '') {
g_form.setValue('assignment_group', '');
return;
}
var gr = g_form.getReference('cmdb_ci', setSupportGroup);
function setSupportGroup(gr) {
if (gr)
g_form.setValue('assignment_group', cmdb_ci.assignment_group);
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-17-2015 11:46 PM
Replace
g_form.setValue('assignment_group', cmdb_ci.assignment_group);
With
g_form.setValue('assignment_group', gr.assignment_group);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2015 12:28 AM
Hey Kalaiarasan P thank you very much! I really appreciate a lot your help though I used this!
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading)
return;
var group = g_form.getReference('cmdb_ci', setGroup);
}
function setGroup(group) {
if (group)
g_form.setValue('assignment_group', group.support_group);
}
And it worked! but seriously! Thank you very much! you helped me understand!