Match not found, reset to original
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2020 04:35 AM
Hi,
I'm trying to autopopulate business service when assignment group change. whenever I'm trying to change the assignment group and saving that task "Match not found, reset to original" this error showing.
Business service table name is "cmdb_ci_service". I have checked the value is exist on table.
I have tried add sys_id or valve no difference same error showing.
Below is my code
Please suggest
Thanks,
Sowmya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2020 04:46 AM
Hi Sowmya,
When does this happen? When it goes in IF loop or when in Else loop.
Check if there dependancy or some other scirpt that makes Business Service & Assignment Group work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2020 06:41 AM
Does the Business Service change after the error message? Is there a reference qualifier on the field?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2020 07:35 AM
Probably because the field you're trying to update is a reference field and you're assigning a string containing sys_id to it instead of sys_id itself.
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var query_result = new GlideRecord('cmdb_ci_service');
query_result.addQuery("cmdb_ci_service", "Email");
query_result.query(callBackFunction);
function callBackFunction(query_result) {
if (query_result.next()) {
g_form.setValue("service", query_result.name);
}
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2020 07:54 AM
It is done on the form with g_form. You have setValue() to set a string as the sys_id. And setDisplayValue() to set a string as the display value. So no need for query and callback.