PDA

View Full Version : Calculated field


ABC123

dcorcoran
03-01-2005, 12:50 AM
I have three different rates of tax in my products i.e 4%, 7%, 16% I want to put three calculated fields in my Invoice header to give me the base total for each tax. So what I want to say for the calculation is "if "iva4=4" then total field "extension" but I cannot seem to get the syntax correct this is what I tried.
"if(Invoice_Items-"Iva4=4,total(Invoice_Items-"Extension),0"
I get "invalid or incomplete expression"

Thomas Holt
03-01-2005, 04:09 AM
Hello David,

I think(?) this can be done a couple of ways (V4 user here)

Total(if(Invoice_Items-"Iva4=4,Invoice_Items-"Extension,0)

or

calc1=if(Invoice_Items-"Iva4=4,Invoice_Items-"Extension,0)

calc2=Total(calc1)

Hope this helps, if not sorry for confusing things more.