Sorting Issues Due to Exceeded Number of Digits Limit for incident tableIssue Numbering of records has exceeded the OOB 'number of digits' of 7. Which is causing a issues when trying to sort by number from the list view. I wanted to know what the recommended number to increase the 'number of digits' would be to cover 10+ years of records?ReleaseXanaduCauseThe root cause of the problem is that the OOB 'number of digits' limit of 7 has been exceeded due to the increasing number of records over time. This is causing issues when attempting to sort records by number in the list view.Resolution1. It's a string field and the string fields are going to sort that way. All computers do that. Go to System Definition> Number Maintenance, locate the INC record and change the number of digits from 7 to 8 or 9 and you'll get padded 0s and be able to sort. 2. The script went something like this - note, you'll want to test this in scripts - background first on a few DEV records (which is why the setLimit(5) is in there). For a million records, this could take a while. var incGr = new GlideRecord('incident'); incGr.setLimit(5); incGr.query(); while (incGr.next()) { incGr.setWorkflow(false); incGr.autoSysFields(false); incGr.forceUpdate(true); incNum = incGr.getValue('number'); incNum = incNum.replace('INC', ''); // strip off the INC var newNum = pad(incNum, 7); // Make a 7 digit count w/padded 0s inc.number = 'INC' + newNum; inc.update(); } function pad(n, width, z) { z = z || '0'; n = n + ''; return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n; } Note: The exact number of digits to set depends on the customer's specific situation and average record creation rate. The customer should consult with their ServiceNow administrator or contact ServiceNow support for further assistance.