I am having trouble getting an unstored calculation to update on tableview forms correctly and consistently.
I load a global array with values, then my calculated field simply reads a corresponding value from the array to get a quantity.
If I change a value in the array, some of the records in the tableview update correctly and some don’t. If I stop the application and restart, all are updated correctly.
I have a master form, with a tableview form for orders in a tabpanel at the top, and a related tableview form for order items on another tabpanel below. When a record is highlighted above (an order), the items show in the lower table. The calculated field is in the lower items table. If I change the qty field on an item, I update the global array value for that item to keep a running total qty for that item_id for all orders.
After I change a qty, the record I’m sitting on changes correctly. If I select a different record in the above orders table, the calculated field may or may not update. If 10 orders should be showing the same value in the calculated field, 6-8 will be correct, and the others will not be updated.
My calculation in the calculated field is a simple associative array lookup. Nothing else.
FYI: I was using a dataset query to perform this calculation previously, but it too had the same problem updating consistently. I read other posts that said putting queries in calculated fields is not supported, so I rewrote the whole module to use a global array. Now I’m getting the same behaviour. Seems much more like a tableview bug now. Hopefully there’s a simple solution I’m missing though.
Any thoughts? Thanks.