
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2017 10:17 AM
Hi,
We want to to auto-numbering on a certain table with a date prefix but I am a bit stuck...
I can't find anyone who has posted this in the past on this community but I do know the solution exists...
Any idea anyone?
Solved! Go to Solution.
- Labels:
-
Incident Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2017 03:19 AM
We used condition: When = OnDisplay
with the following script to add the date of today as a prefix:
var month = '', day='', year='';
var gdt =new GlideDateTime();
month = gdt.getMonth();
day=gdt.getDayOfMonth();
year=gdt.getYear();
var array='';
array=current.number.split('VLN');
current.number='VLN'+day+month+year+array[1];
//current.number = current.number + month;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2017 10:37 AM
Nothing out of the box will do this, but you can create a business rule that runs on insert to set the number to whatever type of sequence you want. The only out of the box method is using "Number Maintenance" which allows you to assign a prefix and then a number will increment.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2017 03:19 AM
We used condition: When = OnDisplay
with the following script to add the date of today as a prefix:
var month = '', day='', year='';
var gdt =new GlideDateTime();
month = gdt.getMonth();
day=gdt.getDayOfMonth();
year=gdt.getYear();
var array='';
array=current.number.split('VLN');
current.number='VLN'+day+month+year+array[1];
//current.number = current.number + month;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2020 12:27 PM
There is one problem in this .
After submission of the form when i viewed the form then it's displaying VLN2020092020090001.
it's repeating the year and date .How to solve this can any help !!