Understand using replaceable parameters to generate sample names
- Last UpdatedOct 23, 2024
- 2 minute read
To easily identify the group of samples by a template name in a report, a Replaceable Parameter is used to generate sample names. When a sample is generated, the actual sample name (sample.sample name) is derived from the template sample name (sample_plan.sample_name) that is configured for the sample plan from which the sample is generated.
Sample names are generated as a frequency type is evaluated in the sample generation code. In the order of evaluation, shift frequencies are evaluated before calendar frequencies. If sample names have an incremental octothorpe, and samples are generated for shift and calendar frequencies, the sample name numbering will not be in time order.
The following table shows a list of replaceable parameters that can be successfully replaced from the template sample name. The following table shows examples, that use the current date by default (10/27/2015 local date).
|
Replaceable Parameter (Case Insensitive) |
Value Returned |
Example |
|---|---|---|
|
[YYYY] |
Year |
2015 |
|
[MM] |
Month of the year (integer) |
10 (with leading zeros) |
|
[MONTH] |
Name of the month |
October |
|
[DD] |
Day of the month |
27 (includes leading zeros) |
|
[WW] |
Week of the year |
44 (includes leading zeros) |
|
[DAY] |
Day (in full) of the week |
Tuesday |
|
[WD] |
Day of the week |
3 |
|
[DY] |
Day of the year |
298 (includes leading zeros) |
|
[EntityName] |
Name of the entity |
Blender |
|
[WorkOrderID] |
Work Order ID |
WO123456 |
|
[OperationID] |
Operation ID |
BlendingOperation |
|
[SequenceNumber] |
Job Sequence Number |
0 |
|
[ItemID] |
Item ID |
Item123456 |
|
[CharacteristicName] |
Characteristic Name If a sample contains more than one characteristic, the name from the first characteristic that is added to this sample is returned. |
Viscosity |
|
[QMSpecName] |
QM Specification Name |
QMSpecA |
|
[FrequencyName] |
Frequency Name |
FrequencyA |
|
[SamplePlanName] |
Sample Plan Name |
SamplePlanA |
|
[SegmentRequirementID] |
Segment Requirement ID |
SegmentRequirement |
|
[SegmentResponseID] |
Segment Response ID |
SegmentResponse |
|
[####] |
Integer value returning the next highest number. If none is found, it returns 1, including leading zeros. If the maximum is reached, then the maximum value is retained. The number of octothorpes is not limited for a template sample plan name. |
0001 (includes leading zeros) |