HistoryWalker API does not detect field changes when a field is clearedIssue When using the sn_hw.HistoryWalker API, the getChangedFieldNames() method does not return a field name when that field has been cleared (set to empty). This means that clearing a field such as Assigned To is not detected as a change, even though the field value changed from populated to empty. The issue is most visible when comparing actual versus expected output from a background script that walks record history. Release All supported releases Cause This is expected platform behavior. The getChangedFieldNames() method does not return fields that have no value. If a field is cleared and the resulting value is empty, it is not included in the list of changed fields. Resolution The workaround compares field values between consecutive history walker states to detect fields that have been cleared. Instead of relying solely on getChangedFieldNames(), the script retrieves all fields at the current and previous update numbers and compares their values directly. To run the workaround script, navigate to System Definition > Scripts - Background. An admin role is required to access and execute background scripts. Replace _ with the number of the incident record to inspect, then run the following script: var incGr = new GlideRecord('incident'); incGr.get('number', '<incident-number>'); var hw = new sn_hw.HistoryWalker(incGr.getTableName(), incGr.getUniqueValue()); hw.walkTo(0); do { printChangedFields(hw); } while (hw.walkForward()); function printChangedFields(hw) { var updatenumber = hw.getUpdateNumber(); if (updatenumber == 0) { var walkedGr = hw.getWalkedRecord(); var fields = GlideScriptRecordUtil.get(walkedGr).getChangedFieldNames(); gs.print("Fields changed at update " + hw.getUpdateNumber() + " were:"); for (var j = 0; j < fields.size(); j++) gs.print(" " + fields.get(j)); gs.print(""); } else { var walkedGr = hw.getWalkedRecord(); fields = new GlideRecordUtil().getFields(walkedGr); var prevupdatenumber = updatenumber - 1; var hw2 = new sn_hw.HistoryWalker(incGr.getTableName(), incGr.getUniqueValue()); hw2.walkTo(prevupdatenumber); prevwalkedGr = hw2.getWalkedRecord(); fields2 = new GlideRecordUtil().getFields(prevwalkedGr); gs.print("Fields changed at update " + hw.getUpdateNumber() + " were:"); for (var j = 0; j < fields2.length; j++) { if (walkedGr.getValue(fields[j]) != prevwalkedGr.getValue(fields2[j]) && !fields[j].startsWith("sys_")) gs.print("changed " + fields[j]); } gs.print(""); } }