Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Auto Increment Numerical Value in Catalog Item Variable "Project number"

prasad8
Giga Expert

Hi,

My requirement :

I have created one new variable in catalog item "Project Number", for this project number variable i need auto numbering functionality like incident number.

 

find_real_file.png

Please help me on this requirement.

 

 

Thanks,

 

 

9 REPLIES 9

Alessandro Alme
Giga Guru

Hi @Alessandro Almeida ,

 

I have create auto number in catalog variable not in table fields

Please help on this

 

Thanks,

Prasad.

Saurav11
Kilo Patron
Kilo Patron

Hello, 

You can give javascript:getNextObjNumber(); in default value of variable for auto numbering in service catalog form .find_real_file.pngfind_real_file.png

Please mark answer correct/helpful based on impact.

Ankur Swami
Tera Guru

Hi,

Actually we don't have any OOTB way for the catalog variables.

You can build a custom solution like i explained below:

 

1. Create a system property "add_auto_inc"

Type = Integer

Value = 10001 or what ever you want to give in Integer.

2. Create a onSubmit catalog client script and in that script call a script include Where you will be updating the system property value by +1

Ex: 10001 + 1 which is 10002

3. In you project ID variable run a javascript in the default value:

javascript: 'PRJ'+gs.getProperty('add_auto_inc');

 

This way you can achieve your requirement.

If my logic helps you then please mark my answer correct.

 

Thanks,

Ankur