-
Candis Knott
- PowerBuilder
- Wednesday, 5 March 2025 02:35 AM UTC
Hello
There is previous code (PowerBuilder 12.5) that is attempting to use Choose Case statements to update the datawindow expression of a computed field and I'm trying to figure out why it is not working.
I've found the example below but I still don't understand how it would update the expression of the computed field. Would anyone be able to provide an example of setting a datawindow expression based on an expression that is set using a choose case statement. Also, what would go in the General -> Expression field in the datawindow, if I wanted it to be dynamically updated?
Any help would be greatly appreciated!
Select the control and set the value in the Properties view, General tab, Expression option. The More button displays the Modify Expression dialog, which provides help in specifying the expression. The Verify button tests the expression.
Examples
Example 1
setting = dw1.Object.comp_1.Expression
dw1.Object.comp_1.Expression = "avg(salary for all)"
Example 2
setting = dw1.Describe("comp_1.Expression")
dw1.Modify("comp_1.Expression='avg(salary for all)'")
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.