Does any one knows about this error message

Pradeep Patel1
Tera Contributor

PradeepPatel1_0-1719544971690.png

 

7 REPLIES 7

Tai Vu
Kilo Patron
Kilo Patron

Hi @Pradeep Patel1 

That message is from the UI Action below.

Name: Validate Coalesce Fields

URL: https://<instance_name>.service-now.com/sys_ui_action.do?sys_id=4d6974ea43622110553ff5821cb8f2a9

 

It may not related to the issue you're facing that is "I am making two fields coalesce here. but the row with same value for field 1 and field 2 gets inserts, rather than update."

 

If enable 2 coalesce fields not works, you can consider to make 1 coalesce field that is the Sys Id field. Then write a script to query the existing target record with 2 input fields from the source record. If next we return the sys_id of the target one.

 

Cheers,

Tai Vu

Hi @Tai Vu ,

 

 

 

I tried writing script but still checking for single field only not for the combination

 

var upd = new GlideRecord("sn_risk_advanced_risk_assessment_scope");
upd.addEncodedQuery('entity.name=' + source.u_entity + '^risk_assessment_methodology.nameSTARTSWITH' + source.u_ram);  //Check whether record exits with same combination of entity and RAM
upd.query();
if (upd.next()) {
    action = 'update';
}

Aditya02
Tera Guru

Hi @Pradeep Patel1 , You can see this to know about this error:

 

Understanding the Error-

Coalesce Fields: These are fields that are supposed to uniquely identify a record in the target table.
                             For example, if email is a coalesce field, it should uniquely identify a user.
Multiple Matches: The error indicates that there are two or more records in the target table with the same value
                                in the coalesce field(s). This ambiguity prevents ServiceNow from determining which record to
                                update.


Causes of the Error -

Duplicate Records: The target table has duplicate records where the coalesce field values are not unique.
Incorrect Coalesce Field Choice: The field(s) chosen as coalesce fields are not unique across records, leading
                                                        to multiple matches.
Data Integrity Issues: There may be underlying data integrity issues that have caused duplicate entries


How to Resolve the Error -

Identify and Resolve Duplicates:
           *Check the target table for duplicate records based on the coalesce field(s).
           *Remove or merge duplicate records to ensure that coalesce fields uniquely identify records.

Re-evaluate Coalesce Fields:
           *Ensure that the fields chosen as coalesce fields are unique identifiers for the records.
           *If necessary, choose different or additional fields that can uniquely identify a record.

Modify Import Data:
           *Ensure that the import data does not contain values that would match multiple existing records.
           *Clean the import data to avoid duplicates.

Update the Transform Map:
           *Navigate to the transform map in ServiceNow.
           *Adjust the coalesce settings to use fields that are guaranteed to be unique.