Maintaining Job Syntaxes
Overview
Job syntaxes are used to generate a job's code and name.
Process
Configure a syntax to generate job codes
When a job is created, the job's Code is generated using a syntax from the current laboratory or organisation, where the syntax's Syntax Type is Job Code and the Syntax Code is JOB_CODE_SYNTAX. Only one syntax per job type should be in use per current lab or organisation.
Configure a syntax to generate job names
When a job is created the job's Name can be generated using syntax from the current laboratory or organisation, where the syntax's Syntax Type is Job Name and the Syntax Code is JOB_NAME_SYNTAX.
Note: If the JOB_NAME_ONLY_FROM_SYNTAX application preference is checked then job names can only be created from a 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.
Multiple syntaxes can be generated in one run. When a syntax is generated, the last number is updated.
Examples
- A Job Code Syntax where the laboratory code is followed by fixed characters and an incrementing number:
${String Lab = Laboratory.legalEntityNumber.asEllipseValue
return Lab}_JB##########
where:
- Outer Seq Floor = 1
- Outer Seq Ceiling = 9999999999
- Outer Seq Increment = 1
- Last No = 10
- A job name of fixed characters followed by an incrementing number:
${String Lab=Laboratory.name.asEllipseValue
return Lab}_LB$yy######
where:
- Outer Seq Floor = 1
- Outer Seq Ceiling = 999999
- Outer Seq Increment = 1
- Last No = 512
where the $yy variable is set to the 2-digit current year
- A job name of the laboratory code followed by fixed characters and an incrementing number:
${String Lab=Laboratory.code.asEllipseValue
return Lab}_JB####
where:
- Outer Seq Floor = 1
- Outer Seq Ceiling = 9999
- Outer Seq Increment = 1
- Last No = 3220
- A job name of the laboratory name followed by the year and an incrementing number:
${String Lab=Laboratory.name.asEllipseValue
return Lab}$yy-#####
where:
- Outer Seq Floor = 1
- Outer Seq Ceiling = 999999
- Outer Seq Increment = 1
- Last No = 1435
