Field values is not getting updated in the list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-14-2018 10:00 PM
We have a field called 'Tower' (defined in the Group table) in the Incident form. It populates automatically based upon the assignment group selected. When we open a record, we can see the values in the Tower field but the same is not updated in the list view. We have to run a background script to update the same. We want the field values to get updated in the form as well as in the list. Please assist on this.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-16-2018 01:30 AM
Hi Harsh,
When i disabled the client script and updated manually it looks fine. The problem is with the client script.
Please reply with the code to fix the issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-16-2018 04:28 PM
Hi Suvetha
Script is ok . You need to do some test on it. Please follow below
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (newValue === '') {
return;
}
var gr = g_form.getReference('assignment_group', callback);
function callback(gr)
{
alert("HcAlert: vendor " + gr.u_vendor+"Tower : "+gr.u_tower); // Check what alert is displaying
//Set the assignment group which has below u_vendor and check if alert is displaying which is inside if
if(gr.u_vendor == "1562a5dcdb1a7600714afb541f96194d") {
alert("HcAlert Found vendor");
//g_form.setDisplay('u_tower',true);// commented for now. you can uncomment based on the result
g_form.setValue('u_tower',gr.u_tower);
}
else{
//g_form.setDisplay('u_tower',false); commented for now. you can uncomment based on the result
}
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-14-2018 10:52 PM
Adding to harsh comments please do check on ACLs as well
Below thread may help please have a look
https://community.servicenow.com/community?id=community_question&sys_id=e3660fe1db1cdbc01dcaf3231f961946
Regards,
Chalan

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2018 03:32 AM
Hi,
In above screenshot how the Tower field is filled???
I mean it was filled by using client scripts it is not applicable in list view.
if your requirement is auto population try to use in BR .It is come to list view too.