---
sourceDocument: Xanadu ServiceNow AI Platform Administration
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/platform-administration

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu ServiceNow AI Platform Administration

ft:clusterId :

    - platadm

bundleId :

    - platadm

workflow :

    - Platform


---

# Prepare to left-pad number fields in custom tables

# Prepare to left-pad number fields in custom tables {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

Before you configure left padding of number fields on a custom table or a table that
does not extend the task table, you must prepare business rules and script
includes.

## Before you begin

Role required: admin

## Procedure

1. Duplicate the base system business rule named Pad Numbers: Click Insert and Stay.  
   If Insert and Stay is not available on your instance, create a new business rule and manually copy all field values from Pad Numbers.
2. Give the business rule a new name and change the script field to read as follows:  

       padCurrentCategory();
       function padCurrentCategory() {
       var target = new GlideRecord(current.category+"");
       if (!target.isValidField("u_number") || target.isValidField("number")) return;
       var nm = new UNumberManager();
       nm.padTableNumbers(current.category, current.maximum_digits);
       }; 

3. Save the changes.
4. Duplicate the base system script include named NumberManager.
5. Change the following two lines as indicated:  

       105: currentNumber = records.u_number.toString();
       117: records.u_number = prefix + currentNumber;

6. Name the new script include <kbd class="ph userinput">UNumberManager</kbd> and save your changes.  
   You can now continue with the process of configuring left-padding and renumbering records.
* **[Configure left padding of a system number in a table](https://servicenow-prod.fluidtopics.net/ma1kXIF2nseqWyecjAYoDw)**   
  You can configure the left padding of the system numbers on a table. For example, pad the Number field on an Incident, Problem, or Change Request.

