Skip to the content.

Examples

Overview · Rule Patterns · Profile Examples · Name Examples · Common Examples


Profile Rule Examples

  1. Overview
  2. Fixed Material by Profile family
  3. Prefix by Radius
  4. Length by Profile depth
  5. Grating Material substring match
  6. CHS Material by depth and thickness
  7. CHS fallback Material rules with onFirstMatch
  8. CHS Length override rules with onAnyMatch

Grating Material substring match


Problem

Some complex profile names cannot be validated using a simple wildcard pattern.

For example, a grating profile such as A325-MPG-993 may need to be checked against a material value where only part of the profile string is significant.

Strategy

Use a normal profile match to recognise the grating family, then audit MATERIAL with StringCompare.

The comparison uses a substring from a cell rather than a full-cell comparison.

This is useful when the important identifier is embedded inside a larger string.

Rule Structure

Subject
PROFILE
Match
Recognises the grating profile family
Target
MATERIAL (cell to receive audit result)
Target Type
StringCompare
Comparison Column
PROFILE
startIndex = 0
stringLength = 4

Minimal Tree

Subject: PROFILE
  Match: <grating pattern>
    Target: MATERIAL

Example Logic

Material (Target) value:

A325-MP*

Profile (Comparison) value:

A325-MPG-993

Relevant substring from Profile:

StartIndex = 0
StringLength = 4
Result = A325

Comparison:

MATERIAL startsWith PROFILE substring

Example Results

Profile Material Substring Used Result
A325-MPG-993 A325MP* A325 Okay
A325-MPG-993 A253MP* A325 Error

Why This Pattern Is Useful

This example demonstrates why StringCompare exists.

A standard Like or wildcard pattern is not always enough when:

Notes

This pattern is a good reference whenever a rule needs: