How to create auto number for the field in the custom table

mohammadtaneem
Tera Contributor

Hello Everyone I'm currently working on my project called My College ,i am trying to auto generate a number for an field which is string  i am  not able to do  that  can anyone guide me .

I'm  working on an Application called as My College where all the People related to college can  use this application to fulfill their request if anyone have ideas which can be included in this project please share them, those  will be most useful to me and project

3 REPLIES 3

Siddhesh Wani1
Tera Guru

Hi @mohammadtaneem ,

To create auto number counter you have to create a new record in the table sys_number
You can navigate through All > System Definition > Number Maintenance
Create new record there give suffix, Number and Number of digit and check whether it's create number on the table. 

If this helped to answer your query, please mark it helpful & accept the solution.
Thanks 
Siddhesh

Bhuvan
Kilo Patron

@mohammadtaneem 

 

Do this in your table creation or configuration. Go to table_name.LIST from Application Navigator. Go to Configure -> Table -> Controls tab

 

Select auto number, choose Prefix, Number and Number of digits for the auto-numbering

Bhuvan_0-1757778003049.png

 

Refer below link for additional details,

 

https://www.servicenow.com/community/developer-articles/auto-numbering-records-how-it-works-and-how-...

 

I hope you appreciate the efforts to provide you with detailed information. If my response helped to guide you or answer your query, please mark it helpful & accept the solution.

 

Thanks,

Bhuvan

Andrew_TND
Mega Sage
Mega Sage

Hey @mohammadtaneem 

 

If you go to System Definition > Number Maintenance you can select the new table and define a prefix/naming convention. E.g. COL00001. 

Alternatively this can also be defined in the table properties.

 

Please mark as helpful or if it’s resolved the issue, CORRECT!