String value only yes , no or empty

0
Hi all,    When an user fill in the ‘early unloading’ field it should only contain ‘yes’, ‘no’ or should be empty. I thought this was the right microflow with a decision but it doesn't work. Does anybody know how to fix this?  
asked
1 answers
0

Hi Ian, assuming the attribute “Early_Unloading” is a string attribute, the right way to check for yes/no/empty would be

 

$Lineservices/Early_Unloading = 'yes'
or
$Lineservices/Early_Unloading = 'no'
or
trim($Lineservices/Early_Unloading) = ''

Although a cleaner approach would be to make this an enumeration field with the values of Yes and No, which can be selected via a dropdown so you don’t even have to validate this field at all.

answered