Match not found, reset to original

Sowmya20
Tera Contributor

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

find_real_file.png

Please suggest 

Thanks,

Sowmya

8 REPLIES 8

Jaspal Singh
Mega Patron
Mega Patron

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.

Willem
Giga Sage
Giga Sage

Does the Business Service change after the error message? Is there a reference qualifier on the field?

Hitoshi Ozawa
Giga Sage
Giga Sage

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);
        }
    }
}

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.