Running an AdminUI, when setting an expression to set a virtual User Directory attribute mapping as:
(attribute1=<value>) ? attribute2 : (attribute3=<value>) ? attribute4 : attribute5 + <constant>
then the virtual attribute doesn't get enhanced, and the user isn't found. When using the expression
(attribute1=<value>) ? attribute2 : attribute5 + <constant>
Then the user is found and the <constant> gets appended to the value of the attribute5.
Put the second ternary operator in () parenthesis to solve this issue.
(attribute1=<value>) ? attribute2 : ((attribute3=<value>) ? attribute4 : attribute5 + <constant>)