Resolve Creating compound expressions in Portrait Dialogue

Product Feature: Selections


When building an expression within Visual Dialogue, the use of compound expressions will often cause the SQL to fail - even though the expression is sometimes marked as being OK.
A compound expression is where one expression is nested within another one.
For example, the following compound expression:

Length(Uppercase("testString")) = 20

appears to be entirely valid, but when run against a data set, it returns the error:

"The len function requires 1 argument(s)"

Other errors are seen when different combinations of expression are used.


This appears to be a limitation in the way that Dialogue currently translates the expression into an SQL equivalent.


UPDATED: April 21, 2017
Try to remove the need for the outer expression by adding it to the other side of the operator.
For example, instead of the following compound expression:

ToString(Year(Now())) = "2015"

Try the following balanced expression:

Year(Now()) = StrToInt("2015")

Alternatively, you can directly edit the SQL by clicking the Change Mode button and opting for SQL mode rather than Design mode. This does require a knowledge of writing SQL scripts.
If you choose this option, make sure that you save or backup your existing Selection expression before making any changes.
Finally, the last option would be to created a new calculated field in the customer domain that represents the specific data that is needed in the expression. This means that there is no data manipulation required in Portrait Dialogue to create the expression values.