Below is a function which allows the user to enter an arithmetic expression and then evaluate it and return the result. This will work for addition (+), subtraction(-), multiplication(*), division(/), and exponentiation(^). You can also enter parenthesis to change the order of precedence if needed. You would call this from where ever you like to…
You are currently browsing the post archives for March 2010.
Powerbuilder – Evaluating Arithmetic Expressions
PowerBuilder – Populate a dropdownlistbox from a SQL statement
Here is a method to populate a dropdownlistbox control with values from a sql statement. Since it is based on a datastore you can easily apply filters, sorts, etc. prior to populating the dropdownlistbox with values. The code assumes the first column in the SQL is going to be used to populate the dropdownlistbox .…
PowerBuilder – ‘Smart’ Crosstab Datawindow
I had a question from a co-worker regarding a functionality request from a user. Basically they wanted a datawindow to display information for vendors (basic stuff like name, amt 1, amt 2, amt 3, etc.) for a specific set of amount columns. Each line represents one vendor and the various amounts (if any) with a…