Ticket #100 (new enhancement)

Opened 2 years ago

Last modified 1 month ago

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

Changed 1 month ago by mark.drew@…

  • milestone set to 1.0 Release

Changed 1 month ago by TomChiverton

  • keywords spam added
Note: See TracTickets for help on using tickets.