Auto Numbers in SPC/SQC Applications: Importance, Configuration, and Best Practices

Why Auto Numbers Matter in an SPC/SQC Environment

In Statistical Process Control (SPC) and Statistical Quality Control (SQC), accurate record-keeping is essential for traceability, auditability, and maintaining data integrity. Auto numbers, or automatically incrementing identifiers, ensure each record has a unique, sequential identifier. This helps in:

  • Tracking data lineage: Easily reference records for audits or quality reviews.
  • Ensuring data integrity: Avoid duplication or gaps in record-keeping.
  • Simplifying workflows: Automates tedious manual processes, reducing human error.

Overview of Auto Numbering in Quality Window

Quality Window supports multiple approaches for generating and managing auto numbers. These methods provide flexibility to meet various operational needs while maintaining audit trails and traceability.

This guide explains two primary approaches for auto numbering in Quality Window applications:

  1. Auto Number via the Application Audit Feature
  2. Auto Number as a Calculated Field
Auto Numbering in a QW Application
Example Auto Numbering in a QW Application


1. Auto Number via the Application Audit Feature

How It Works

The application audit feature allows you to designate a variable to store auto numbers. When a record is saved:

  • If the designated auto number variable is blank, the system increments the last stored value by 1 and assigns it to the variable.
  • If no prior value exists, the system starts with 1.
  • If the user manually sets a value, the system updates the value with the provided number, ensuring the next blank record uses the updated sequence.

Administrators can protect the variable to prevent users from tampering with the auto number.

Setup Steps

  1. Open QW Admin.
  2. Go to Maintain Applications and select the desired application.
  3. Under the Variable View tab:
    • Create a numeric variable with a sufficient length (recommendation: 8 digits for up to 99,999,999 records).
    • Set Control Limits to be Blank
    • Busitech recommends that the variable is protected, though this is an optional choice.
  4. Under the General View tab:
    • In the Transaction Audit Trail section, set the “Variable used to store auto number” property to the variable created.
  5. Save the application and open it in Quality Window Workstation.
  6. Add and save a new record to verify that the auto number increments correctly.
Auto Number Setting in General View - Transaction Audit Trail Section
Auto Number Setting in General View – Transaction Audit Trail Section
Auto Number Variable Definition

Setting an Initial Value

To preset the auto number:

  1. Decide the desired starting number and subtract 1.
  2. Locate the application’s .QWN file in the same directory as the .QWT file.
    • If the file does not exist, create one.
  3. Open the .QWN file in a text editor (e.g., Notepad) and enter the number.
  4. Save the file with the application’s name.
Example Setting Auto number Value in Notepad
Example Setting Auto number Value in Notepad

Pros

  • Easy to set values manually.
  • Preserves values regardless of insertion sequence.
  • Allows user overrides when needed.

Cons

  • Auto numbers only appear after a record is saved.
  • Sequences can become inconsistent if records are inserted out of order.

2. Auto Number as a Calculated Field

How It Works

Using a calculated variable, auto numbers can be dynamically generated based on the sequence of records. This approach recalculates numbers to maintain strict order, even when records are inserted between others.

This method uses the MPREV (Moving Previous) function to look back at the last recorded value, add 1, and assign the result.

Setup Steps

  1. Open QW Admin.
  2. Go to Maintain Applications and select the desired application.
  3. Under the Variable View tab:
    • Create a calculated variable with sufficient length (recommendation: 8 digits).
    • Set Control Limits to be Blank
    • Use the formula (@MPREV[V4,2])+1, where V4 is the variable index for the calculated variable.
  4. Save the application and verify the calculated numbering.
Calculated Auto Number Variable Definition

Example

If the previous record’s variable has a value of 5, the next record’s value will be 6.

Pros

  • Maintains strict sequential numbering, even with inserted records.
  • Numbers are always in sequence.
  • Users cannot modify or override values, ensuring consistency.

Cons

  • Numbers are not statically stored; recalculations occur if records are inserted.
  • Values cannot be adjusted mid-sequence.
  • Users cannot see the auto number while adding/editing records.

Choosing the Right Method

FeatureAudit Trail Auto NumberCalculated Field
Static StorageYesNo
Strict Sequential OrderNoYes
User Override CapabilityYesNo
Value Visibility During InputNoNo
Recommended Use CaseFlexible record numberingStrict sequential numbering

Conclusion

Auto numbering is a critical feature for maintaining order and integrity in SPC/SQC applications. By understanding and selecting the appropriate method for your needs, you can enhance traceability and streamline data management within your Quality Window system.

For additional guidance or technical support, please contact your system administrator or consult the Quality Window support team.

Unlock your data with QW6 SPC Software

Smart teams know the key to improved results is unlocking data that will show you where to look. Give QW6 a try for free and gain the visuals and statistics that can lead your path to success.

Translate »