Create Domain Rule Using a Text Rule
Use a text line to create a rule that has one or more conditional expressions.
- On the right side panel of the Domain Management screen, click Text Rule.
-
On the text line that appears, enter a conditional expression that has the
following format:
<columnoperand> <operator> <value_or_values>
-
<columnoperand> is either a column name or function on one or more column in the domain.
Examples of column expressions with string columns include First_Name of the<domainname> + Last_Name of the<domainname> or concatenate(First_Name of the<domainname>,Last_Name of the<domainname>).
Examples of column operands with number columns include Weight of the<domainname> / Height of the<domainname> or Hours of the<domainname> * Rate of the<domainname>.
For more information about functions, see the Related Information.
-
<operator> is one of the operators listed in the topic in the Related Information.
-
<value_or_values> must be the same data type as the <columnoperand>.
NoteYou can take advantage of the suggestion lists that automatically appear when you start typing parts of the conditional expression. For example:-
If you type Zi, you can select Zipcode of the<domainname> from the list of columns that appears.
-
Hit the space bar, and a suggestion list of operators appear. If you start typing is not, the suggestion list changes to only a subset of operators starting with those words.
-
Hit the space bar, and a suggestion list of column names and keywords such as null and concatenate appears. If you type nu, you can select null from the list that appears.
If the column is a string data type, either enter a value surrounded by single quotation marks or select <'string'> from the suggestion list.
-
-
If you want to add another rule expression, enter one of the following operands before you
enter another conditional expression.
Option Description and If the record must comply with all conditions or If the record can comply with one or more conditions For example, to define a rule that Zipcode, State, and City must not be null, enter the following conditional expressions in the Rule Text. A record will fail this rule if any of the three columns is null.
Zipcode of the<domainname> is not equal to null and State of the<domainname> is not equal to null and City of the<domainname> is not equal to null
-
Click the Save icon in the upper right corner.
If the rule expression is not valid, a message appears indicating the error. In this case, fix the error and validate the rule again.
-
You can now take one of the following actions:
- For Quality Dimension, click the down arrow and select the quality dimension this rule will measure.
- Click the Scorecard icon to select rules to run together for a specific quality dimension.