Quality Control Sample
A Quality Control Sample is a physical unit removed from a production run for inspection purposes. In Commander4j, each sample is assigned a unique Sample ID that is printed on a label and affixed to the sample. This ID is the key used to record and retrieve all test results associated with that sample.
Creating a Sample
Samples are created through the Quality Control Sample screen in the desktop application.
Selecting a Process Order and Activity
The operator first selects the Process Order being sampled. The system automatically retrieves and displays:
- The Material being produced
- The Inspection ID linked to that material or order
- The list of available Activities for that inspection
The operator then selects an Activity — the specific inspection point or stage at which the sample is being taken (for example, start of run, mid-run, or end of run).
User Data Fields
Four configurable User Data fields (User Data 1–4) are available for capturing additional context about the sample. The use of each field is defined per site — common examples include packing line, shift name, operative, or batch reference. Each field can be set as mandatory or optional, and their editability is controlled by system settings.
Lookup buttons are available for User Data 2 (Packing Line) and User Data 3 (Shift Name), allowing the operator to select from a list rather than typing.
Sample Date and Time
The date and time the sample was taken is recorded. An optional auto-clock feature updates this field automatically every second, so the timestamp is accurate to the moment the label is printed.
Printing the Label
The operator selects a Print Queue and the number of label copies required (the default number of copies is set by the system key QM SAMPLE LABELS). Label resolution (200 dpi, 300 dpi, or default) can also be selected.
When the Print button is pressed:
- A new unique Sample ID is generated by incrementing a counter stored in the system control table (
QM SAMPLE ID). - A record is created in
APP_QM_SAMPLEwith the Sample ID, Process Order, Material, Inspection, Activity, timestamp, operator, and User Data values. - The label is sent to the selected print queue. The label carries the Sample ID in both human-readable and barcode form.
Editing an Existing Sample
After a sample has been created, its metadata can be reviewed and corrected through the Sample Record screen. The Sample ID, Process Order, Material, and Inspection are read-only. The User Data fields and sample date can be edited and saved.
Labels can be reprinted from this screen if required.
Recording Test Results
Once a sample label has been printed and the physical sample is being tested, results are entered through the Update Samples screen. The Sample ID (scanned from the label or entered manually) is used to locate the sample record and display the relevant test columns.
Database Table
Sample records are stored in APP_QM_SAMPLE with the following key fields:
| Column | Description |
|---|---|
| sample_id | Unique numeric identifier (generated automatically) |
| inspection_id | The inspection point this sample belongs to |
| activity_id | The activity/stage at which the sample was taken |
| process_order | The production order being sampled |
| material | The product material code |
| sample_date | Date and time the sample was taken |
| user_id | The operator who created the sample |
| user_data_1 | Configurable custom field |
| user_data_2 | Configurable custom field (typically packing line) |
| user_data_3 | Configurable custom field (typically shift) |
| user_data_4 | Configurable custom field |
See also: Inspections, Dictionary, Update Samples, Results Analysis and Reporting