Conditional coalesce script for sys_id creates record with sys_id of "-1"Issue Customer was using below script to match sys_id with existing record and if not found will set value to -1. var gr = new GlideRecord('u_manager_request');gr.addQuery('u_employee_id', source.u_employee_id);gr.orderByDesc('sys_created_on');gr.query();if(gr.next() && gr.u_active == true){answer = gr.sys_id; //if a match exists, return the sys_id of the matching manager request}else{answer = -1;} However it was observed that a record with sys_id = -1 gets created created on table - u_manager_requestCauseIt is expected behaviour for instance to create a record with sys_id which provided explicitely. e.g - If we run the below script, an incident record will be created with sys_id = 12345678 var gr = new GlideRecord('incident');gr.initialize();gr.setWorkflow(false);gr.work_notes = 'pratik_test';gr.short_description = 'testimg with sys id';gr.sys_id = '12345678';gr.insert();ResolutionIf we are to use conditional coalesce for sys_id, we need to use method generateGuid() to instruct the ssystem to create new sys_id. Customers can write script as - var gr = new GlideRecord('incident');gr.addQuery('number', source.some_unique_number);gr.query();if(gr.next()){return gr.sys_id; //if a match exists, return the sys_id of the matching Incident record} else {return GlideGuid.generate(null);}})(source); Using similar script, we are returning the sys_id of existing record if match found, however if the sys_id doesn't match then we are instructing the instance to create new GUID (sys_id).