Code Description Qnt Unit Cost 95A0101/1 LABOUR 1 E 1000 95A0102/1 % ADjustment for labour 20 % 200 95A0201/1 PLANT 1 E 500 95A0202/1 % ADjustment for Plant 10 % 50The idea is that whenever I change the value of the LABOUR Cost then
* This routine is called from the grid quantity valid * it will calculate the percentage variation item * It assumes that the percentage variation code will be 1 greater than the provisional sum code * Eg. * If the provisional sum code is 95A0101/1 it assumes the Variation item will be 95A0102/1 sele v_tickitm lcSumCode=V_tickitm.code lcVarCode=strtran(v_tickitm.code,'1/1','2/1') lnSumAmount=v_tickitm.cost * move the rcord pointer to the percentage variation item locate for v_tickitm.code=lcVarCode with Thisform.ItemGrid .recchange() if found() .CostColumn.cost.value = (lnSumAmount/100)* .RateColumn.rate.value && v_tickitm.rate contains the percentage amount to apply .CostColumn.cost.refresh else messuser('<alert> You have deleted a Dayworks variation item. Please ensure all standard dayworks items are the tender') endif endwithI did this after my attempts to do the work on the underlying table failed becuase I could not get my grid to refresh.