Look up Specifications from Another Table when Creating Quality Inspection Tests

Skip to main content

Look up Specifications from Another Table when Creating Quality Inspection Tests

You are here:

The following guides you through an example of using product specifications from another table as part of a pass condition when creating Quality Inspection Tests. These specifications are target values, and you can use Quality Inspector either directly or reference these values (plus or minus a percentage).

For this example, the following must be reached:

  • Ash must match the target specification exactly.
  • Nitrogen can be +/- 2% of the target specification.
  • Salt can be 1% lower and 3% higher than the target specification.

The custom Example Specification table contains example target values of specifications.

Version Target Protein Content % Target Nitrogen % Target Fatty Substances % Target Ash % Target Fiber % Target Salt %
CHEESE1 23.00 3.70 33.00 4.00 0.00 2.50
CHEESE2 20.00 3.70 34.00 4.00 0.00 2.20
CHEESE3 22.00 3.10 32.00 2.00 0.00 2.30
CHKPEA 9.00 1.30 2.50 3.00 8.00 1.50
WWFLR 14.00 2.20 2.00 1.50 12.00 0.10

The table definition is:

Copy to Clipboard

The item “Cheese” references one of the specifications, and the field is Example Specification Version.

For this example, we are going to set the Example Specification… field to “CHEESE1” for our “CHEESE” example item. This allows the item to change specifications over time to the custom specification table.

The rest of the Item Card’s information should be as follows:

  • No.: CHEESE
  • Description: Cheese
  • Type: Inventory
  • Example Specification…: CHEESE1

The table extension with this custom field is:

Copy to Clipboard

This example uses three fields in its Quality Inspection Template. Create three fields (ash nitrogen, and salt).  These all have percentages with an allowable value of between 0 and 100.

Code Description Field Type Allowable Values Default Value
EXASH example ash Decimal 0..100
EXNITROGEN example nitrogen Decimal 0..100
EXSALT example salt Decimal 0..100

Create a quality inspection template for the food product using the three fields above (ash, nitrogen, salt).

Input into the following fields:

  • Code: FOODEXAMPLE
  • Description: Food example with lookups

Select Test Generation Rules and create a test generation rule to match the food products.

For this example, use a purchase line and filter to match the Cheese item.

Description Table Condition Filter Item Filter Attribute Filter
Food example with lookups Purchase Line WHERE(No.=FILTER(CHEESE*))

Ash condition

For the Ash condition, the requirement is that it must match the target specification exactly. The target specification is in the Example Specification table. You can set the target specification as numbers in the pass condition.

To reduce configuration and duplication of configuration in the system, leverage the following features:

  • Item lookups.
  • Custom table lookups.

In the template:

  1. Select Add Field(s) to This Template.
  2. Select New Field.
  3. Input “Example Target Ash” in the Description field.
  4. Select “Advanced Configuration” in the What type of data is it? field.
  5. Select Next.
  6. Select “Numeric Expression” in the Field Type field.
  7. Select the … (Assist Edit) button in the Expression Formula field.
  8. Enter the following formula:
[Lookup(Example Specification;Target Ash Pct.;Version=[Item:Example Specification Version])]
  1. Select Close.
  1. Create a new test.

The pass condition for salt on the new Quality Inspection Test is now “4”.

Create a Quality Inspection Test to test configuration so far

The parameters on the Create Quality Inspection page read as:

  • Template Code: FOODEXAMPLE
  • Source: PURCHTOTEST
  • Choose Record: Purchase Line: Choose a purchase order line in your system that is purchasing a cheese item for a given lot.
  • Item No.: CHEESE
  • Serial No.: [Blank]
  • Lot No.: WENSLEYDALE001
  • Package No.: [Blank]

The pass conditions on the new Quality Inspection Test for (after completing the corresponding sections):

  • Ash: 4
  • Nitrogen: 1.7..5.7
  • Salt: 1.5..5.5

Nitrogen condition

The next requirement to meet is “Nitrogen can be +/- 2% of the target specification”.

To do this, use a combination of:

  • Embedded formulas
  • Item lookups
  • Table lookups

In the template:

  1. Select Add Field(s) to This Template.
  2. Select New Field.
  3. Input “Example Target Nitrogen” in the Description field.
  4. Select “Advanced Configuration” in the What type of data is it? field.
  5. Select Next.
  6. Select “Numeric Expression” in the Field Type field.
  7. Select the … (Assist Edit) button in the Expression Formula field.
  8. Enter the following formula:
{[Lookup(Example Specification;Target Nitrogen Pct.;Version=[Item:Example Specification Version])]-2}..{[Lookup(Example Specification;Target Nitrogen Pct.;Version=[Item:Example Specification Version])]+2}
  1. Select Close.
  1. Create a new test.

The pass condition for salt on the new Quality Inspection Test is now “1.7..5.7”.

Salt condition

The final requirement to meet is “Salt can be 1% lower and 3% higher from the target specification”. This is like the previous requirement for Nitrogen, but the approach is different and instead uses the addition of another calculated field.

To do this, use a combination of:

  • Embedded formulas
  • Item lookups
  • Table lookups.
  • Calculated Field

In the template:

  1. Select Add Field(s) to This Template.
  2. Select New Field.
  3. Input “Example Target Salt” in the Description field.
  4. Select “Advanced Configuration” in the What type of data is it? field.
  5. Select Next.
  6. Select “Numeric Expression” in the Field Typ field.
  7. Select the … (Assist Edit) button in the Expression Formula field.
  8. Enter the following formula:
[Lookup(Example Specification;Target Salt Pct.;Version=[Item:Example Specification Version])]
  1. Select Close.
  1. Select the … (Assist Edit) button on the pass condition for “EXSALT”.
  2. Input the following formula:
{[EXAMPLETARGETSALT]-1}..{[EXAMPLETARGETSALT]+3}
  1. Create a new test.

The pass condition for salt on the new Quality Inspection Test is now “1.5..5.5”.

You have now used several features including item lookups, custom table lookups, embedded formulas, and calculated fields to allow a variety of automatically changing pass conditions.

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
Need help?

Leave A Comment

Table of Contents
Go to Top