How to generate sequence numbers on a catalog form

Servicenow lear
Tera Contributor

Team,

 

I have a requirement where There is a variable called ROLEID on my catalog form and I want it to generate number sequence Everytime someone uses the form.

For example ROLEID number is 1234 generated with help og MATH.random() but then next number should be 1235

3 REPLIES 3

Drew8
Tera Guru

Hi, are these role numbers being stored in a table after the catalog item is ordered? What is the use of the number? Why does it need to be sequential?

Hi , yes the Value will be stored on a table on a field called ROLEID.

the flow is > User goes to catalog form and the ROLEID generates 4 digit number starting from 1001 which gets saved on table.>>if the user refreshes the form the role id value should change to next number 1002.

this value is not similar to request number on a table because this will only be used in certain cases