New portal records not being included in calculation

Discussion created by todd- on Dec 3, 2014
Latest reply on Feb 8, 2015 by disabled_jackrodgers

Any help is greatly appreciated! I've spent many of hours trying to figure this out to no avail. : (


A Layout showing records from Payments with a Portal showing records from Invoices.


The portal shows records from Invoices. And Includes the PaymentDetail::Amt field.


The idea is the user enters payment information (ex. ck amt & ck#) and invoices due are listed in the portal. When the user enters an amount to apply towards an invoice, they enter the amount in the portal row into the PaymentDetail::Amt field. This creates an new PaymentDetail record.


I have a non-stored calculated field Payments::cSumOfPaymentDetailsAmt. The user is not allowed to save unless Payments:PayAmt = Payments::cSumOfPaymetDetailsAmt.


So far all works as should, however when the user enters a new amount to apply to an Invoice in he portal it is not added to Payments::cSumOfPaymentDetailsAmt unless a Commit is done which defeats the whole purpose of not allowing the user to save the data until Payments:PayAmt = Payments::cSumOfPaymetDetailsAmt.


My understanding is records in a transaction are created that can be seen but not fully saved until commited. And the new PaymentDetail record is their but the Payments table can not see it until the relationship re-queries the results.


I have tried numerous combinations of calc fields, relationships, etc and even the following article which didn't seem to work ...

Ditch those Flush Caches, Use Cartesian Join Instead!


It seems this would be a common practice in solutions but I just can't figure out how to get the calcuated field to show the correct results from the new records in the portal.


Relationship graph -

Payments -> Invoices -> PaymentDetails


Payments table






Invoices table









Amt (this is the part of a payment applied to an invoice)