Adding new values to an array using Array.push() replaces all values in the array with the last value pushedDescriptionWhen adding new values to an array object using Array.push(), it replaces all values in the array object with the last value pushed. Consider the following sample script to fetch all the open P1 incidents on Software category. Run it in "Scripts - Background" of your instance. Sample ScriptSample Outputvar criticalIncident = [];var inc = new GlideRecord('incident');inc.addActiveQuery();inc.addQuery('priority', '1');inc.addQuery('category', 'software');inc.query();gs.info("Total Records: " + inc.getRowCount());while (inc.next()) { gs.info("Incident Number: " + inc.number); criticalIncident.push(inc.number);}gs.info("Critical Incidents: " + criticalIncident);*** Script: Total Records: 5*** Script: Incident Number: INC0000015*** Script: Incident Number: INC0000051*** Script: Incident Number: INC0000052*** Script: Incident Number: INC0000054*** Script: Incident Number: INC0009005*** Script: Critical Incidents: INC0009005,INC0009005,INC0009005,INC0009005,INC0009005 In the sample script output you can see that on printing the criticalIncident array object, all the values is array object is replaced by the last value pushed.CauseThis happens only in the Servicenow Platform. The Array.push() method has to be passed a String value, else it will override all values in the array to the last value pushed.ResolutionYou can use toString() method on the variable while pushing it into an Array object. Please refer the below modified script which pushes all the values to the array object and retains them correctly. Sample ScriptSample Outputvar criticalIncident = [];var inc = new GlideRecord('incident');inc.addActiveQuery();inc.addQuery('priority', '1');inc.addQuery('category', 'software');inc.query();gs.info("Total Records: " + inc.getRowCount());while (inc.next()) { gs.info("Incident Number: " + inc.number); criticalIncident.push(inc.number.toString());}gs.info("Critical Incidents: " + criticalIncident);*** Script: Total Records: 5*** Script: Incident Number: INC0000015*** Script: Incident Number: INC0000051*** Script: Incident Number: INC0000052*** Script: Incident Number: INC0000054*** Script: Incident Number: INC0009005*** Script: Critical Incidents: INC0000015,INC0000051,INC0000052,INC0000054,INC0009005