Questions? Feedback?powered byOlark live chat software
Bug 1891

format expression does not evaluate 'if' statements if they are stored in column 05 December, 2018

mike S
16 November, 2018
Product: PowerBuilder Category: DataWindow
Version: 2017 R3 Publishing: Public
Status: Transferring Priority: P4
Classification: Enhancement Resolution:
Ken Guo 05 December, 2018
Appeon Test Case

Hi Mike,

If “if” is used in the expression, you will need to use the Describe and Evaluate methods.
We’d suggest you to reference the attached sample to implement your functionalities. 

Mark Lee 19 November, 2018
Hi Mike,

Thanks for your reporting this problem and for your valuable suggestion.
We will record it as a requirement/enhancement request.
We will transfer it to our product team consideration.

Mark Lee
Govinda Lopez 16 November, 2018
Hi Mike,

I will transfer this ticket to our engineering team for further analysis. We will keep you posted on the results here.

mike S 16 November, 2018

if you use a format expression you can use datawindow expression such as :
If(salary>60000, 'Overpaid', 'Underpaid') 
and it displays either Overpaid or Underpaid  correctly.

if you use another column as the format expression you can have formats as the column value such as:
and the format works correctly.

However, if you have:
'If(salary>60000, "Overpaid", "Underpaid") '
as the column value, the format displays: If(salary>60000, "Overpaid", "Underpaid")  rather than evaluating the format expression.

*Reproduce Steps:
create a datawindow that has a value column, and a format column.
enter values and for the format enter and IF statement.
setup the datawindow to use the format column as the format expression value.

try different formats in the format column.  if they are expressions they do not work, but if they are just standard formats they do work.

12.5.1 works the same way, and it is possible they all prior versions did too.

this would be a nice enhancement to have the format evaluate.  This would allow for more powerful display options for a drop down when there are multiple rows  that have different drop down list values.
Database Type:
Database Version: