Advanced Formula-Based Quality Checks

Advanced Formula-Based Quality Checks

1. Overview

This article covers how to implement formula-based quality checks in iVendNext. Use this information to:
Create dynamic formulas for inspections
Apply mathematical and logical operations
Troubleshoot common formula errors


Why Use Formulas?

  • Validate product grades (A/B/C)

  • Calculate averages/variances (e.g., pH levels)

  • Enforce multi-parameter rules (e.g., "Weight must increase if density > X")




2. Prerequisites

Before creating formula-based checks:


  1. Enable Quality Inspection in the Item Master

  2. Create a Quality Inspection Template

  3. Basic understanding of:

    • Arithmetic operators (+, -, *, /)

    • Comparison operators (>, <, ==, !=)

    • Logical operators (and, or, in)




3. Formula Types & Syntax

3.1 Numeric Formulas

Validate calculations against numeric criteria:


# Example 1: Sum of readings < 100  

(reading_1 + reading_2) < 100  


# Example 2: Mean of readings > 50  

mean > 50  


# Example 3: Ratio constraint  

(reading_1 / reading_2) < 2.5  



3.2 Text/Non-Numeric Formulas

Validate text patterns or categories:


# Example 1: Exact match  

reading_value == "Pass"  


# Example 2: Value in list  

reading_value in ("A", "B", "C")  


# Example 3: Exclusion check  

reading_value != "Defective"  


3.3 Hybrid Formulas

Combine numeric and text logic:


# Example: Reject if "Color" is Red AND "Weight" < 10kg  

reading_value == "Red" and reading_1 < 10  




4. Step-by-Step Setup

4.1 Add Formula to Template

  1. Open Quality Inspection Template

  2. For a parameter:

    • Check "Formula Based Criteria"

    • Enter formula in Acceptance Criteria Formula

  3. Save


4.2 Apply in Quality Inspection

  1. Create a New Quality Inspection

  2. Select the template → Formulas auto-populate

  3. Enter readings → System auto-calculates results




5. Advanced Use Cases

5.1 Statistical Validation

# Standard deviation < 5  

std_dev < 5  


# 90th percentile > 100  

percentile_90 > 100  


5.2 Conditional Logic

# Reject if: Temperature > 30°C AND Humidity > 80%  

reading_1 > 30 and reading_2 > 80  


5.3 Cross-Parameter Rules

# Density must correlate with weight  

(reading_1 / reading_2) > 0.5  




6. Troubleshooting

Here’s a quick look at some common issues you might run into.


Error

Solution

SyntaxError

Check for missing brackets/operators

NameError

Use only reading_X or reading_value

ZeroDivisionError

Add validation: reading_2 != 0


IdeaPro Tip: Test formulas in Draft Mode before submission!




    • Related Articles

    • Quality Inspection

      Overview This guide provides a step-by-step walkthrough of setting up, executing, and managing Quality Inspections in iVendNext. Why Quality Inspections Matter: Quality Inspection ensures products meet predefined quality standards before they are ...
    • Understanding Quality Inspection Summary Reports

      Overview This article gives you an overview of the Quality Inspection Summary Report. This report helps you monitor and analyze the quality of incoming, outgoing, and in-process items. 1. Accessing the Quality Inspection Summary Report To view the ...
    • Integrating Quality Inspection with Inventory Management

      1. Overview Seamless integration between quality inspections and inventory management creates a closed-loop quality system that: ✔ Prevents defective stock from entering inventory ✔ Automates hold/release decisions based on QC results ✔ Maintains ...
    • Quality Inspection Analytics in iVendNext: Data-Driven Quality Control

      1. Overview This article gives you an overview of how Quality Inspection Analytics helps retailers interpret inspection data and convert it into clear, actionable insights by: ✅ Identifying recurring defects ✅ Tracking supplier and customer quality ...
    • Advanced Web Form Features - Unlocking Powerful Capabilities

      Overview This article will help you build sophisticated forms that enhance productivity and user experience. 1. Dynamic Field Control Conditional Logic & Field Dependencies Show/hide fields based on user input to create smart, adaptive forms: // ...