Calculation not updating on record change

I have two simple calculations that are not updating on changing a record.

It is an inventory item, with the stored columns QTY_S and COST_S (both numbers).

In the display form, the columns QTY and COST are calculated from the items relation via INV_to_UOM (Unit Of Measure) where the inventory UOM_ID = UOM_ID of the uom table.

The user can use a dropdown list, populated from the UOM table, to choose how to display the QTY and COST - ie, by changing the UOM_ID, thereby changing to a different related record and different uom_factor in that related record.

QTY is calculated by :

return QTY_S / INV_to_UOM.uom_factor;
``` where the uom_factor is some multiplier off the base qty - ie, mg = base, g = 1000xbase, kb = 1000000xbase.

COST is calculated by:

return COST_S * INV_to_UOM.uom_factor;

For some reason, when the user chooses a new uom, the calculated fields are not updating. A close / cache flush however will then show the correct value.

This worked fine in 2.2.7, and is NOT working in 3.1.4.

Shouldn't this calculation update? I've set up a practice form and placed all the relevant columns on there...I see the UOM_ID change, the INV_TO_UOM.uom_factor change, yet COST and QTY calculations do not update.

Changing QTY_S or COST_S causes QTY and COST to be calculated correctly, respectively, but not both at the same time. 

Can a calculation that relies on a related record not be updated by changing the record it relates to?

Nolan M.
FSCI

for some reason, tabbing out was not working… so the record wouldn’t update. I tried it again while clicking out, and it updates fine.

I reset all the forms TAB order and now the calcs update after changing the UOM and then tabbing out.

Sorry for the trouble…baffling for a short time :slight_smile: