All of the following is done with the goal of squeezing every bit of WAN performance out of my DB that i can.
I am toying with the idea of some self healing auto enter calcs. I am converting some unstored calculations into auto-enter calcs where it makes sense and finding huge performance gains. I need to script these refreshes from a few different places and even contexts.
I would like to use a let function to say that any time a field is modified to anything else, it will evaluate itself and reset to the proper value.
field invoice::amountDue isan of auto-enter calc
Let ( [
~x = Self
~invoiceTotal = invoice::total
~paid = Sum ( invoice_paymentItems::amount)
~invoiceTotal - ~paid
after a new payment item is created, I can set the field amountDue to itself ( or any other value if i screw it up ) from any context and it will evaluate with the new value. the field will also evaluate if the invoice total is modified. but it will not evaluate any other time.
I have also thought about including a field that will function as an auto-enter fixer. I can include it in the let statements of all my auto-enters and set it to true at any point to refresh them all if needed.
Am I missing anything with this thought process?