Auto Values: Difference between revisions
Line 33: | Line 33: | ||
|- | |- | ||
|nowrap="1"|'''seqm(''' ''z'', ''r'' ''')''' | |nowrap="1"|'''seqm(''' ''z'', ''r'' ''')''' | ||
| | | | ||
:{| class="prettytable" | |||
|- bgcolor="#e0e0e0" | |||
|'''Description''' | |||
|- | |||
|A number starting at 1 at the beginning of each month, and incremented by one each time the sequence is used. This is the monthly incremental value for this specific sequence instance. S | |||
|} | |||
|- | |- | ||
|nowrap="1"|'''seqy(''' ''z'', ''r'' ''')''' | |nowrap="1"|'''seqy(''' ''z'', ''r'' ''')''' |
Revision as of 17:08, 20 February 2015
Home > Administration > Data > Auto Values
Introduction
The Auto Values feature lets an administrator define how auto-generated values, such as reference IDs, are constructed. Places where more than a sequence number (000001234) is required, an Auto Value can be modified to include dates, time, location, teams, user IDs and more. There are many situations where this type of sequence is much more preferable over a simple numeric sequences. Some examples include: -
- Shipment numbers
- Document or Article Reference Numbers
- Stock Item Codes
- Asset ID's
- Access Code numbers
Available Auto Value Component Parts
The following lists of component parts are available to construct an auto value.
seq( z, r ) |
| ||||||||||||||||||||||
seqd( z, r ) | A number starting at 1 at the beginning of each day, and incremented by one each time the sequence is used. This is the daily incremental value for this specific sequence instance. See the component 'seq' for and explanation of the optional 'z' and 'radix' parameters. | ||||||||||||||||||||||
seqm( z, r ) |
| ||||||||||||||||||||||
seqy( z, r ) | Will be translated into a number starting at 1 at the beginning of each year, and incremented by one each time the sequence is used. This is the yearly incremental value for this specific sequence instance. See the component 'seq' for and explanation of the optional 'z' and 'radix' parameters. | ||||||||||||||||||||||
The 'z' parameter is optional but if specified indicates the number of leading zero's to display, if not specified then ZERO is assumed. If the number of digits in the resultant value exceeds the number of places defined here, then the left-most digits will be discarded. The 'r' parameter allows you to specify the base to use when converting the numeric value to a string. The default value if not specified is ten (10), any value between 2 and 36 is valid.
| |||||||||||||||||||||||
date( [part] ) |
| ||||||||||||||||||||||
udate( [part] ) |
| ||||||||||||||||||||||
uuid( [type] ) |
| ||||||||||||||||||||||
sess( prop_name ) | The current user’s session property. | ||||||||||||||||||||||
param(param_name) | A value passed into the function when invoking the sequence. | ||||||||||||||||||||||
rec( column_name ) | will be translated into the value that will be written to the database record. |