This rule checks whether a specific value is equal to or found within the value of the specified field. This rule returns true if the conditions are matched; otherwise it returns false. The syntax for equals is:
<equals fieldName="name" value2="value" exact="true/false"/> |
The parameters for equals are:
fieldName – The qualified field name or assigned variable for the field to check.
value2 – The value to compare with the value of the specified field.
exact – An indicator of whether to match exactly against the specified value or to find the specified value within the field value. Specify “true” to match exactly against the specified value, or specify “false” to check for the value within the field.
The following rule checks whether the value of the gender field equals 2, FEM, or FEMALE. If any of those values are found, they are changed to “F”. This standardizes the values that indicate a gender of female to the correct processing code for female. If the three listed values are not found in the gender field, the record is returned as good data.
<rule> <if> <condition> <or> <equals value1="Person.Gender" value2="FEMALE" exact="true"/> <equals value1="Person.Gender" value2="2" exact="true"/> <equals value1="Person.Gender" value2="FEM" exact="true"/> <equals value1="Person.Gender" value2="FML" exact="true"/> </or> </condition> <then> <assign fieldName="Person.Gender" value="F"/> </then> <else> <return fieldName="Person.Gender"/> </else> </if> </rule> |