Omnis Mysql defined list

Jonathan Rumbold jr at omnipotent.com.au
Thu Dec 15 18:03:57 EST 2016


Hi Stephen,

I'm not sure about that, but you can add calculated columns to a query class prior to defining the list. The calculation needs to be SQL, so you could call a function in your DB to deliver the goods.

..................................
Jonathan Rumbold

On 16 Dec. 2016 9:42 am, Stephen Baugh <stephenbaugh at queensberry.com> wrote:
Hi Everyone

Is there a way to add columns to a .$definefromsqlclass list definition, so that a calculation is processed as the list is built?

This might be a pick lookup or math function etc

I want to add for example, the following calculations to this definition, after of course adding the new columns separately if required.

Do $cinst.iWindowList.$definefromsqlclass($cinst.iRowTableName) Returns lvStatus

Calculate Month as ovControl.$doDivide(C_SUPP_BAL_MTH,REG_EXCHANGE_RATE)
Calculate Current as ovControl.$doDivide(C_SUPP_BAL_CUR,REG_EXCHANGE_RATE)
Calculate 30days as ovControl.$doDivide(C_SUPP_BAL_30,REG_EXCHANGE_RATE)
Calculate 60days as ovControl.$doDivide(C_SUPP_BAL_60,REG_EXCHANGE_RATE)
Calculate 90days as ovControl.$doDivide(C_SUPP_BAL_90,REG_EXCHANGE_RATE)

Both C_SUPP_BAL_MTH and REG_EXCHANGE_RATE are defined in the list definition.

I hope this makes sense, and as always thanks for the help.

Cheers
Stephen



_____________________________________________________________
Manage your list subscriptions at http://lists.omnis-dev.com




More information about the omnisdev-en mailing list