Check for Multiple Values with a Single Rule using Regex and Match
Real-Life Mapping Scenario
We are receiving an inbound x12 EDI 850 (Purchase Order) where we need to test the N104 value for various values. We have 2 options to check for these values.
- 1. Create multiple instances of the same rule and add an conditional rule that checks for a unique value
- 2. Create a single instance of the same rule and a single conditional rule that checks for ALL the unique values
In our example below, we will check for ALL the unique values in a single rule
Ruleset Rules Set-up
In our ruleset we set-up a Composite Rule and apply the Match Rule Condition.
Applying Rule Condition to Composite Rule
In the Match Condition we will apply Regex syntax to compare multiple values.
Comparing Regex Value Against Input Value
After the Match Condition is applied, we will test the N104_VN value against multiple values such as 7777, 195800, 103008, 7036, 101406 and etc.
By: Sean Hoppe on