{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":39731,"path":"platform-administration/t_AutoNumberingRecordsInATable.md","title":"Add auto-numbering records in a table","bundle":null,"doc_type":null,"release":"australia","body":"\n# Add auto-numbering records in a table\n\nYou can define one number format per table in the system.\n\n## Before you begin\n\nRole required: admin\n\n## Procedure\n\n1.  Navigate to **All** &gt; **System Definition** &gt; **Number Maintenance**.\n\n2.  Select a table name to view the number record for that table, or click **New**.\n\n3.  Define the number format by completing the fields \\(see table\\).\n\n4.  Select **Submit** or **Update**.\n\n    If an auto-numbered field does not already exist, a new field is automatically created on the table with the following values:\n\n    -   Label: Number\n    -   Name: u\\_number\n    -   Default value:\n\n        ```\n        javascript:getNextObjNumberPadded();\n        ```\n\n        **Note:** This script renumbers records when the **Number of digits** is updated. To use a script that does not renumber records when the **Number of digits** is updated, open the dictionary entry for the **Number** field and enter the following script in the **Default value** field.\n\n        ```\n        javascript:getNextObjNumber();\n        ```\n\n<table id=\"table_m1c_qbf_tp\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nTable\n\n</td><td>\n\nSelect a table.\n\n</td></tr><tr><td>\n\nPrefix\n\n</td><td>\n\nEnter a prefix for every number in the table \\(for example, **INC** for Incident\\).\n\n</td></tr><tr><td>\n\nNumber\n\n</td><td>\n\nEnter the base number for this table \\(default value is 1000\\). Record numbers are automatically incremented, and the next number is maintained in the Counter \\[sys\\_number\\_counter\\] table.If you set the base number to a value higher than the current counter, the next record number uses the new base number. Otherwise the next record number uses the current counter. The counter does not reset to a base number lower than itself. To see the current counter, click the **Show Counter** related link.\n\n</td></tr><tr><td>\n\nNumber of digits\n\n</td><td>\n\nEnter the minimum number of digits to use after the prefix \\(default value is 7\\).-   Leading zeros are added to auto-numbers, if necessary. For example, **INC0001001** contains three leading zeros.\n-   The number of digits can exceed the minimum length. For example, if **Number of digits** is **2** and more than 99 records are created on the table, the numbers continue past 100 \\(such as **INC101**\\).\n **Warning:** Changing this field may update all number values for existing records on a table. Take care when changing this field on a production instance.\n\n</td></tr></tbody>\n</table>    When moving some applications these records may not be automatically included. Take care to ensure that all necessary records are present when moving applications.\n\n    **Note:** To change the default values for new number formats, change the **Default value** field on the system dictionary record for the **Number** or **Number of digits** field. These fields are on the Number table.\n\n\n**Parent Topic:**[Record numbering](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-administration/c_ManagingRecordNumbering.md)\n\n**Related topics**  \n\n\n[System dictionary](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-administration/table-administration-and-data-management/c_SystemDictionary.md)\n\n"}}