How to generate a unique code (it should work same like number field we have in RITM and TASK) using text field in request form?

omsa1
Kilo Guru

Hi All,

I'm trying to create a new field with unique value (for example like TAC12345) and the text field should auto generate the code whenever users submit a request (same as number field that we have now).

I tried with javascript:getNextObjNumberPadded(); it didn't work. Please help.

find_real_file.png

find_real_file.png

6 REPLIES 6

raves12
Kilo Sage

Hi Sarasaamani,



Number maintenance is defined only for field and as per your screenshot you are trying to add this to variables. This won't work.



You will have to set up your own custom format to populate the code through script.


Hi Ravi,



I've created new table OCID codes and mapped this table to request variable . but users have to click the new button to generate a record.


I need a script to insert new record into OCID codes table whenever   OCID Needed is selected as 'yes' and then show that number in OCID code field.




find_real_file.png


find_real_file.png


find_real_file.png


Hi


You will be required to create a on submit script on your catalog item. So whenever you will submit a record this script will create a record in your OCID table and will link that to the required variable.Is it a catalog item or record producer??


Hi Harshtimes,



Its a Catalog Item.