AnsweredAssumed Answered

Calculation Sum fields not updating with scripted import

Question asked by BobSchwenkler on Jul 15, 2009
Latest reply on Jul 15, 2009 by etripoli


Calculation Sum fields not updating with scripted import


Hi All,


I'm working on our DB and have run into an issue that's confusing me. I'm working on a ledger that tracks all our accounting. We make some of our sales through Paypal and I've written a script to import our transaction history that I download from Paypal. The script imports into a table specific for imports and then filters through all the line items and creates new records for our sales and returns in the ledger and the ledger line items tables.


The sales information for our different products is being summarized in an inventory table and being drawn from the ledger line items table; it's a one to many between each product and all of the sales records for that product.


These summaries are working fine with all of the other layouts I've created to get sales information into the DB, but when I import our Paypal information these summary fields (unstored calculation fields using the Sum function) don't refresh. Again, these fields are updating just fine in all other circumstances (manual entry). If I go to the ledger line items table and re-enter the inventory item ID# (which is used as the match field) the calculation fields will then refresh to include this one additional record.


The script I'm using to import and create ledger records is nothing too special, it's a looping script that basically uses Create New Record, and global variables with Set Field.


I'm not sure if I've got a setting wrong somewhere or something, but I can't see that I do. Hopefully this is enough information to give you all a reasonable idea of my issue.