- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-28-2014 10:01 PM
I know it is possible to set auto-numbering format as the prefix for new table records (such as INC for incidents or CHG for changes), but is it also possible to establish an auto-numbering suffix format?
For example: I want all new incident records to end in the suffix MAY (for the current month). Thus, when a new incident is created, the record is entered into the table with the number INC10001MAY. The next new incident contains the number INC10002MAY, followed by INC10003MAY, etc.
Thank you in advance!
Solved! Go to Solution.
- Labels:
-
Incident Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-28-2014 10:08 PM
Code :
var gdt =new GlideDateTime();//December
var month = '';
gs.print(gdt.getMonth());
if(gdt.getMonth() == 12)
month = 'DEC';
current.number = current.number + month;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-28-2014 10:05 PM
Yes it is very simple.
Write a business rule ON BEFORE insert on incident table and make the necessary changes to the number field as per the calendar month.
Regards,
Bhavesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-28-2014 10:09 PM
Hello Bhavesh,
Thank you for the prompt response - I am glad to hear the solution is quite simple!
Best,
Myles

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-29-2014 08:30 PM
Please mark the answer as correct if it solves your problem.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-28-2014 10:08 PM
Code :
var gdt =new GlideDateTime();//December
var month = '';
gs.print(gdt.getMonth());
if(gdt.getMonth() == 12)
month = 'DEC';
current.number = current.number + month;