Calculated Fields [SOLVED]
Posted: Tue Mar 16, 2010 11:08 am
Hi All,
I know calculated fields have been mentioned in the past on the forum but a lot of them relate to old versions and I'm hoping some more functionality exists now-a-days. I'm running the latest BETA version.
Here's what I'm trying to do.
I have a table called "BillData". Within it are various fields. The ones of concern are BillTotalExVAT and BillTotalIncVAT. (I think you can see where I'm going with this). I want to manually populate BillTotalExVAT but I want BillTotalIncVAT to update accordingly.
I've tried it like this (Perhaps I'm being a bit too simple) but it doesn't work via Dataface (with mysql Cmnd line, it works fine).
in tables/BillData/fields.ini I have this
in tables/BillData/valuelist.ini I have this
Sadly, the column titled BillTotalIncVAT is just left blank
I'm probably going about this the wrong way. Can anyone assist at all?
Thanks
Paul
I know calculated fields have been mentioned in the past on the forum but a lot of them relate to old versions and I'm hoping some more functionality exists now-a-days. I'm running the latest BETA version.
Here's what I'm trying to do.
I have a table called "BillData". Within it are various fields. The ones of concern are BillTotalExVAT and BillTotalIncVAT. (I think you can see where I'm going with this). I want to manually populate BillTotalExVAT but I want BillTotalIncVAT to update accordingly.
I've tried it like this (Perhaps I'm being a bit too simple) but it doesn't work via Dataface (with mysql Cmnd line, it works fine).
in tables/BillData/fields.ini I have this
- Code: Select all
[BillTotalIncVAT]
widget:label = "Bill Total (Inc VAT)"
visibility:browse = hidden
visibility:find = hidden
vocabulary = BillTotalIncVATCalc
in tables/BillData/valuelist.ini I have this
- Code: Select all
[BillTotalIncVATCalc]
__sql__="SELECT BillTotalExVAT*0.175+BillTotalExVAT FROM BillData"
Sadly, the column titled BillTotalIncVAT is just left blank
I'm probably going about this the wrong way. Can anyone assist at all?
Thanks
Paul