Pass conditions define the criteria that must be met for a rule to pass. They define acceptable values by using basic and logical operators. You can apply pass conditions to rules to evaluate data against the defined criteria.
- Basic conditions are used for simple evaluation scenarios. Configure a basic condition by selecting the value and its operator. The initial value field acts as an alias for all target fields. Any condition configured in the Basic tab is converted into an expression in the advanced tab.
- Advanced conditions are used for complex evaluation
scenarios. In the Advanced tab, you
can configure an expression by using numerical, string, and
logical operators. Note: If a pass condition is applied to a dataset, you must map all fields before you create the rule. A rule cannot be saved until all fields are mapped.
Pass condition for fields
- Select the combination of
<attribute><operator><enter value><value>and type a value that must match the condition. - Select the combination of
<attribute><operator><select field ><field>and select a field that must match the condition. In this case, you can compare the selected field with a field of the same data type. You can use this for all available data types.
The available operators depend on the data type of the selected field. For example, if you select a boolean data type, the third field provides the options true or false. If you select a string data type, you are prompted to enter a specific value.
Pass condition for datasets
- Select the combination of
<attribute><operator><enter value><value>and type a value that must match the condition. - Select the combination of
<attribute><operator><select field><field>and select a field that must match the condition. In this case, you can compare the selected field with a field of the same data type. You can use this for all available data types.
Pass conditions for SQL queries
- Click Add Pass Conditions.
- Enter your SQL query in the Pass condition text box. You can write SQL queries using the available SQL functions, and correlate data across multiple tables directly.
- After you enter the query, the specified conditions are evaluated based on the input, and the rule is evaluated according to the defined pass conditions.
- After successful rule evaluation, the passed count shows the total number of records that satisfy the conditions defined in the pass conditions.
- When you choose assets with the SQL option, you cannot select between basic or advanced pass conditions.
- If the passed count exceeds either the evaluated count or the number of records resulting from a SQL rule evaluation, the system does not produce a quality score for the asset linked to that rule.
Advanced condition for fields and datasets
Use advanced conditions for complex evaluation operations. You can enter expressions by using the available operators, functions, and regular expressions. The advanced condition is also called "Expression Builder" because it allows you to create expressions that evaluate multiple fields, compare values, and apply complex logic. Syntax highlighting improves readability while you create expressions, and validation errors are displayed when an operator or function is used incorrectly.
Expression examples
- Compare a field to a value:
Age > 18 - Compare two fields:
StartDate = EndDate - Combine multiple conditions:
Country = "US" AND State = "NY" - Validate that a field is not empty:
CustomerID != ""
Regular expression examples
You can use regular expressions to verify that field values match a specific pattern.
- Validate a five-digit ZIP code:
regex(ZipCode,"^\d{5}$")Matches:12345 90210Does not match:
1234 12345-6789 ABCDE - Validate an email address:
regex(Email,"^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$")Matches:
user@example.com john.smith@company.org - Validate a product code that begins with three uppercase
letters followed by four digits:
regex(ProductCode,"^[A-Z]{3}\d{4}$")Matches:
ABC1234 XYZ5678
Migrating rules from Trillium
If you are migrating rules from Trillium, review and test all expressions before using them in production. Expression syntax, supported functions, and regular expression behavior may differ from Trillium. Validate migrated rules against sample data to ensure they produce the expected results.
Troubleshooting expressions
- Verify that field names exactly match the field names in the dataset.
- Verify that all required fields are mapped before saving the rule.
- Verify that fields used in comparisons contain compatible data types.
- Verify that regular expression patterns are entered correctly.
- Test expressions against sample data before applying rules to production assets.
- When you use advanced conditions, you must use left and right operands with the operator.
- Field names are case-sensitive when you use advanced conditions. Incorrect field-name casing does not flag an error in the expression and does not apply the set condition.
For example:
ucase(FirstName)=true
The condition is applied when the dataset contains a field
named FirstName.
ucase(FIRSTNAME)=true
The condition is not applied if the dataset does not contain
a field named FIRSTNAME, and no error is
flagged in the expression.