Difference between revisions of "Auto Values"

From Hornbill
Jump to navigation Jump to search
 
(44 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__[[Main_Page|Home]] > [[Administration]] > [[Data]] > Auto Values
+
This document can now be found at its new location in the [https://docs.hornbill.com/esp-config/advanced-tools-and-settings/auto-values/ Hornbill Document Library].
 +
 
 +
[[file:hornbill-document-library.png|Hornbill Cloud|link=https://docs.hornbill.com/esp-config/advanced-tools-and-settings/auto-values/]]
 +
<!--
 +
__NOTOC__[[Main_Page|Home]] > [[Administration]] > [[System Administration|System]] > [[Data]] > Auto Values {{#ev:youtube|_9Dduf-Ga10|400|right}}
 
==Introduction==
 
==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: -
+
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
 
* Shipment numbers
Line 9: Line 13:
 
* Access Code numbers
 
* Access Code numbers
  
==== Available Auto Value Component Parts ====
+
==Auto Value Configuration==
 +
*Description
 +
*Add Auto Value Component
 +
*Current Value
 +
*Daily Increment
 +
*Monthly Increment
 +
*Yearly Increment
 +
*Time last generated
 +
 
 +
== Available Auto Value Component Parts ==
 
The following lists of component parts are available to construct an auto value.
 
The following lists of component parts are available to construct an auto value.
  
{| class="prettytable"
+
{| class="wikitable"
  
 
|-
 
|-
!Name
+
|nowrap="1"|'''seq(''' ''z'', ''r'' ''')'''
!Description
+
|
 +
 
 +
:{| class="prettytable"
 +
 
 +
|- bgcolor="#e0e0e0"
 +
|'''Description'''
  
 
|-
 
|-
|nowrap="1"|'''seq(''' ''z'', ''r'' ''')'''
 
 
|A number starting at 1 when the sequence is first used and incremented by one each time the sequence is used and will never be reset for the entire life of the sequence.  
 
|A number starting at 1 when the sequence is first used and incremented by one each time the sequence is used and will never be reset for the entire life of the sequence.  
*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 'radix' 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.
+
 
  
 
|-
 
|-
 
|nowrap="1"|'''seqd(''' ''z'', ''r'' ''')'''
 
|nowrap="1"|'''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.
+
|
 +
 
 +
:{| class="prettytable"
 +
 
 +
|- bgcolor="#e0e0e0"
 +
|'''Description'''
 +
 
 +
|-
 +
|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.  
 +
|}
 +
 
 +
 
 +
|-
 +
|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.
 +
|}
 +
 
 +
 
 +
|-
 +
|nowrap="1"|'''seqy(''' ''z'', ''r'' ''')'''
 +
|
 +
 
 +
:{| class="prettytable"
 +
 
 +
|- bgcolor="#e0e0e0"
 +
|'''Description'''
 +
|
  
 
|-
 
|-
|nowrap="1"|'''seqm(''' ''[z]'', ''[radix]'' ''')'''
+
|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.
|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. See the component 'seq' for and explanation of the optional 'z' and 'radix' parameters.
+
|}
 +
 
 +
|-
 +
|
 +
|
 +
 
 +
:{| class="prettytable"
 +
 
 +
|-
 +
|
 +
|
  
 
|-
 
|-
|nowrap="1"|'''seqy(''' ''[z]'', ''[radix]'' ''')'''
+
 
|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. ''
 +
 
 +
|}
  
 
|-
 
|-
 
|nowrap="1"|'''date(''' ''[part]'' ''')
 
|nowrap="1"|'''date(''' ''[part]'' ''')
|This function will be translated into the date/time a component of the current date/time based on the analysts current time zone settings.  The parameter 'part' is optional, the following are possible: -
+
|
 +
 
  
 
:{| class="prettytable"
 
:{| class="prettytable"
Line 45: Line 111:
 
|Part
 
|Part
 
|'''Description'''
 
|'''Description'''
 
|-
 
|nowrap="1"|''not specified''
 
|The current date/time format defined for the current session
 
  
 
|-
 
|-
Line 87: Line 149:
 
|-
 
|-
 
|nowrap="1"|'''udate(''' ''[part]'' ''')
 
|nowrap="1"|'''udate(''' ''[part]'' ''')
|This function will be translated into the date/time a component of the current date/time based on UTC.  The parameter 'part' is optional, the following are possible: -
+
|
  
 
:{| class="prettytable"
 
:{| class="prettytable"
Line 141: Line 203:
 
|-
 
|-
 
|nowrap="1"|'''uuid(''' ''[type]'' ''')
 
|nowrap="1"|'''uuid(''' ''[type]'' ''')
|This function will be translated into a newly generated UUID.  The parameter 'type' is optional, the following are possible: -
+
|
  
 
:{| class="prettytable"
 
:{| class="prettytable"
Line 155: Line 217:
 
|-
 
|-
 
|nowrap="1"|''secure''
 
|nowrap="1"|''secure''
|This generates a UUID that cannot be traced to the ethernet address of the computer on which it was generated  
+
|This generates a UUID that cannot be traced to the Ethernet address of the computer on which it was generated  
  
 
|-
 
|-
Line 165: Line 227:
 
|-
 
|-
  
 +
|-
 +
|nowrap="1"|'''sess( ''prop_name'' )'''
 +
|
 +
:{| class="prettytable"
 +
 +
|-
 +
|
 +
|
  
 
|-
 
|-
|nowrap="1"|'''sess( ''prop_name'' )'''
 
 
|The current user’s session property.
 
|The current user’s session property.
 +
|}
  
 
|-
 
|-
 
|nowrap="1"|'''param(''param_name'')'''
 
|nowrap="1"|'''param(''param_name'')'''
|A value passed into the function when invoking the sequence.  A sequence that includes this component can not be auto-bound to a table for automatic sequence generation.  If the sequence is used for this purpose, any record insert will fail as the sequence will throw an error
+
|
 +
:{| class="prettytable"
  
 
|-
 
|-
|nowrap="1"|'''rec( ''column_name'' )'''
+
|
|will be translated into the value that will be written to the database record.  A sequence that includes this component can only be auto-bound to a table and can not be used through a call to the '''data::sequenceComplexGetNext''' API. If it is called directly via the API the sequence will contain "??" in the place where the specified record value should be
+
|
  
 +
|-
 +
|A value passed into the function when invoking the sequence.
 
|}
 
|}
  
== Options ==
+
|-
* Name
+
|nowrap="1"|'''rec( ''column_name'' )'''
* Description
+
|
*Auto Value Components
+
:{| class="prettytable"
:* seq(z,r)
+
 
:* seqd(z,r)
+
|-
:* seqm(z,r)
+
|
:* seqy(z,r)
+
|
:* date()
 
:* udate()
 
:* uuid()
 
:* sess(name)
 
:* param(name)
 
:* rec(name)
 
  
* Current Value
+
|-
* Daily Increment
+
|Use a value that is stored in the database record.
* Monthly Increment
+
|}
* Yearly Increment
+
|}
* Time Last Generated
+
[[Category:Administration]][[Category:Videos]]
 +
-->
 +
[[Category:HDOC]]

Latest revision as of 18:07, 10 April 2024

This document can now be found at its new location in the Hornbill Document Library.

Hornbill Cloud