From Printer Template Help:
{RANDOM} Date based Random Number
{RANDOM:X} Random Number
{RANDOMC:X} Random Number with check digit
Those ^ descriptions are not quite accurate. The only one that generates a Pure Number is {RANDOM}
, while the others actually generate random AlphaNumeric Strings. There is also one other generator which has syntax of {RANDOM:X:<chars>}
##{RANDOM:X}
and {RANDOM:X:<chars>}
##
Generates random strings.
{RANDOM:6}
Generates a 6-character Alphanumeric string, for example “3dH71d”
{RANDOM:4:0123456789}
Generates a 4-character numeric string using values from “0123456789”, for example “7396”
{RANDOM:5:01234abcdefABCDEF}
Generate a 5-character string using values from “01234abcdefABCDEF”, for example “dB3A2”
You can concatenate them if you want:
{RANDOM:3:abcdefghij} {RANDOM:4:0123456789}
Generate 3-character then 4 numeric with space in-between, for example “eab 8303”
##{DATE:X}
Takes the current Date/Time and formats it according to your specification.
{DATE:yyyy-MM-dd_hh.mm.ss.fff}
Generates: 2016-04-25_09.43.22.645
The formatting characters determine the output. For example:
MM : 2-digit Month
mm : 2-digit Minute
MMM : abbreviated 3-character Month
MMMM : Full Name of the Month.
More Format information can be found here:
https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx
Use Random and Date together …
{RANDOM:3:abcdefghij}-{DATE:yyyyMMdd}-{RANDOM:4:0123456789}
Generate 3-characters, then Date, then 4 numeric with dashes in-between, for example “fad-20150425-3858”
Test using Ask Question Action:
<font Consolas><size 20>RANDOM : {RANDOM}\rRANDOMC:5 : {RANDOMC:5}\rRANDOM:5 : {RANDOM:5}\rRANDOM:8:12345abcdEFGH : {RANDOM:8:12345abcdEFGH}\rDATE:yyyyMMdd : {DATE:yyyyMMdd}</size></font>