fireballprinting

Calculation Field Issues

Discussion created by fireballprinting on Jan 5, 2016
Latest reply on Jan 6, 2016 by keywords

Hello,

 

I've been having a strange issue with a chain of calculation fields, and I'm having trouble finding a solution on my own. There are a group of interconnected fields, and the whole chain is kind of complex, so I won't lay it all out here, but I can give any additional information that would be helpful. The issue is that some unstored number calculation fields display as 0 when that's not their actual value. They sometimes do this temporarily, and if I click in a field on the layout they'll update and display the correct amount. I've also noticed that these same fields display the correct values in the data viewer while showing a 0 value in the interface. I'm able to replicate the problem most often when I have two windows open with the same layout, but different records. If I click on a field in one window, the other window will switch to displaying 0's for the fields in question. I've also only seen this issue when the fields are displayed in a portal. I've noticed the issue with a field called jobs::total_grand, that calculates the total of an invoice including tax. Total_grand is an unstored calculation field based on a field from a related table (lines::total) and another calculation field from the same table (jobs::total_tax).

 

jobs::total_grand=Round(lines::total+total_tax;2) - unstored calculation, number

jobs::total_tax =jobs::tax_rate*lines::total_taxable - unstored calculation, number

lines::total=Total of price_extended - summary

lines::total_taxable=Total of price_extended_taxable - summary

lines::price_extended=Round(lines::quantity*lines::price;2) - unstored calculation, number

lines::price_extended_taxable=Case(products::taxable=1;Round(lines::quantity * lines::price;2);"") - unstored calculation, number

 

Any help is much appreciated.

 

Thanks!

Outcomes