SYMPTOM:
When using an Attribute form based on an ApplySimple sentence containing the CASE function to return string and then using this Attribute as a selector in a Dynamic Dashboard, the following error message appears when switching the selector elements in Strategy Web 9.4.1 and above:

An unexpected error has occurred Task #0 failed: ()

Submit Manipulations failed: () Refresh Document failed: Task #0 failed ()

Sql
ApplySimple("IIF(#0>#1, 'A Vencer', IIF(#0< #1, 'Vencido', 'Vincendo')"; ; CurrentTime())Sql
ApplySimple("CASE WHEN #0 > #1 then 'A Vencer' WHEN #0 < #1 then 'Vencido' else 'Vincendo' end"; order_date; CurrentTime())

3) Click on OK, so a message appears, informing that the Form data type is inconsistent with the Column Alias data type what is expected in this case, then click on OK to proceed:

The form selected display type is inconsistent with the data type of the selected column alias. This may result in SQL generation problems when running reports that use this attribute. You may need to use a different column alias to prevent this problem. Do you still want to continue?

CAUSE:
This is a known issue in Strategy Web 9.4.1 and above..
ACTION:
Strategy will continue to investigate and post updates as soon as they are available.
NOTE:
For additional information regarding pass-through expression ApplySimple and Attribute form data type, refer to the Strategy technical notes:
WORKAROUND:
NOTE: Consider this workaround based on the fact it may result in SQL generation issues when running reports that use this attribute.
1) Create a new column alias based on the expected data type, in this case Character as seen:

2) In the Attribute editor, under the Form format menu, in the Type Drop-down list, this workaround worked fine when using either Datetime or Text:

3) Perform a Schema Update.