Starts-with function
$varGender has a value of FEMALE, MALE, Male, Female, or Unknown
My original statement was:
WHEN CONDITION{ starts-with( $varGender, 'F') = True} VALUE=[ 'Female']
WHEN CONDITION{ starts-with( $varGender, 'M') = True} VALUE=[ 'Male']
OTHERWISE VALUE=[ '']
This resulted in the exact opposite result so F was Male and M was Female.
I added single quotes to True and this fixed it:
WHEN CONDITION{ starts-with( $varGender, 'F') = 'True'} VALUE=[ 'Female']
WHEN CONDITION{ starts-with( $varGender, 'M') = 'True'} VALUE=[ 'Male']
OTHERWISE VALUE=[ '']
-
Since the starts-with function already evaluates to true or false, the additional = True condition is redundant. The rule works as expected if the "= True" portion of the expression is removed.
0
Post is closed for comments.
Comments
1 comment