Skip to main content


 

Symptoms


Suppose you have a rule with IF “a control contains a value” condition which compares value of Drop-Down list with some static text you entered in the rule itself, and in case this condition is true you specify to perform some action in THEN clause. Sometimes you may see the situation when IF condition is seemingly met (i.e. Drop-Down list selection value = static text in your rule condition) but action is not being performed.
Sample scenario/use case: You have a Drop-Down list with number of actions to select from (Action 1, Action 2, Action N) and use “a control contains a value” or “an advanced condition is true” type of conditions to perform specific actions (e.g. navigate to another form) based on selection in Drop-Down list.
 

Diagnoses


There are a few things to verify in such scenario and likely it is the case that IF condition not being met indeed. First, your Drop-Down list may use two types for its data source – a static list of values and SmartObject. In case of a static list the value of Drop-Down list will always be index number of selected item from list and not a text of the list value you entered. If SmartObject is used as a data source then it is possible to specify which value will be returned by Drop-Down list as well as display value. I.e. you may use one column of a table as a display value for your drop down list and other as a value it returns.
Another thing to care about is possible encoding issues. In case you are trying to compare some textual values which contain special symbols (e.g. diacritics) it is much better to compare index values to avoid any possibility of encoding issues, as this type of comparison is faster and more reliable.
You may also use IF “an advanced condition is true” condition type in the similar scenario and if this is the case it is preferable to use “Contains” operator instead of “Equals”.
 

Resolution

Verify what is an actual value returned by your Drop-Down list (it is index by default for static lists, and configurable when SmartObject is used as a data source). You may use data label to check which value is being returned by your Drop-Down list.
Try to use index values in your comparison to avoid any issues related with encoding/special characters and use “Contains” operator instead of “Equals” if you use “an advanced condition” in such scenarios.




 
Be the first to reply!

Reply