Ticket #100 (new enhancement)
Adding calculated fields
| Reported by: | cblackwell | Owned by: | dhughes |
|---|---|---|---|
| Type: | enhancement | Priority: | normal |
| Milestone: | 1.0 Release | Component: | Reactor - Object Oriented Queries |
| Version: | Severity: | normal | |
| Keywords: | spam | Cc: |
Description
Currently the setFieldExpression() function only allows you to replace an existing field with an expression. It would be very useful to be able to create a new field based on an expression.
Suggested syntax as originally suggested by Chris Phillips on the mailing list.
query.addFieldExpression(TableAlias, NewFieldName, Expression, [DataType])
For example
query.addFieldExpression("Cheque", "CommisionValue", "(Value/100)*CommissionRate", "cf_sql_double")
Change History
Note: See
TracTickets for help on using
tickets.

