{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":39831,"path":"platform-administration/t_PrepToLeftPadNumFldsInCustmTbls.md","title":"Prepare to left-pad number fields in custom tables","bundle":null,"doc_type":null,"release":"australia","body":"\n# Prepare to left-pad number fields in custom tables\n\nBefore 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.\n\n## Before you begin\n\nRole required: admin\n\n## Procedure\n\n1.  Duplicate the base system business rule named **Pad Numbers**: Click **Insert and Stay**.\n\n    If **Insert and Stay** is not available on your instance, create a new business rule and manually copy all field values from Pad Numbers.\n\n2.  Give the business rule a new name and change the script field to read as follows:\n\n    ```\n    padCurrentCategory();\n    function padCurrentCategory() {\n    var target = new GlideRecord(current.category+\"\");\n    if (!target.isValidField(\"u_number\") || target.isValidField(\"number\")) return;\n    var nm = new UNumberManager();\n    nm.padTableNumbers(current.category, current.maximum_digits);\n    }; \n    ```\n\n3.  Save the changes.\n\n4.  Duplicate the base system script include named NumberManager.\n\n5.  Change the following two lines as indicated:\n\n    ```\n    105: currentNumber = records.u_number.toString();\n    117: records.u_number = prefix + currentNumber;\n    ```\n\n6.  Name the new script include `UNumberManager` and save your changes.\n\n    You can now continue with the process of configuring left-padding and renumbering records.\n\n\n-   **[Configure left padding of a system number in a table](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-administration/t_RenumberingRecords.md)**  \nYou 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.\n\n**Parent Topic:**[Record numbering](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-administration/c_ManagingRecordNumbering.md)\n\n"}}