Maintaining Client, Contact and Quote Syntaxes
Overview
When a client is created, the client's Client Code can be generated from syntax.
When a client contact is created, the contact's Contact Code can be generated from syntax.
Process
Configure a syntax to generate client codes
When a client is created in the CCCLNT—Client application, the client's Client Code can be generated using a syntax from the current laboratory or organisation, where the syntax's Syntax Type is Other and the Syntax Code is CLIENT_CODE_SYNTAX.
Configure a syntax to generate contact codes
When a client contact is created in the CCCLNT—Client application, the client contact's Contact Code can be generated using a syntax from the current laboratory or organisation, where the syntax's Syntax Type is Other and the Syntax Code is CONTACT_CODE_SYNTAX.
Configure a syntax to generate quote codes
When a quote is created in the CCCLNT—Client application, the quote's Quote Code can be generated using a syntax from the current laboratory or organisation, where the syntax's Syntax Type is Quote and the Syntax Code is QUOTE_CODE_SYNTAX.
Syntax Generation Process
The syntax comprises a pattern (for example, $yyyy_###), a floor, ceiling and increment value, and the last number used for both the inner and outer patterns. Note that the magnitude of the ceiling must match the available size of pattern, for example, #### could only fit a number up to 9999.
Org-scope and lab-scope variables are available for use in the syntaxes. Variables can include references to properties of objects exposed to the syntax generator and can invoke custom scripts. Refer to Maintaining and Using Syntax Variables.
When a syntax is generated, the last number is updated.
Examples
- A Client Code Syntax where the laboratory code is followed by fixed characters and an incrementing number:
${String Lab=Laboratory.name.asEllipseValuereturn Lab}_CLI-####
where:
- Outer Seq Floor = 1
- Outer Seq Ceiling = 9999
- Outer Seq Increment = 1
- Last No = 0
- A Contact Code Syntax where the laboratory code is followed by fixed characters and an incrementing number:
${String Lab=Laboratory.name.asEllipseValuereturn Lab}_CONT-####
where:
- Outer Seq Floor = 1
- Outer Seq Ceiling = 9999
- Outer Seq Increment = 1
- Last No = 0
- A Quote Code Syntax where the laboratory code is followed by fixed characters and an incrementing number:
${String Lab=Laboratory.name.asEllipseValuereturn Lab}_QUOTE-####
where:
- Outer Seq Floor = 1
- Outer Seq Ceiling = 9999
- Outer Seq Increment = 1
- Last No = 0
