If i read in the help about the validate function it says that this fires the OnValidate trigger of your field
Now i have this code for a button click:
<Control1000000038> - OnPush()
VALIDATE(AantalKgTotaal,StandaardProductie);
MODIFY;
And then this piece of code in the OnValidate trigger of the field
AantalKgTotaal - OnValidate()
lv_PORegel.RESET;
lv_PORegel.SETRANGE(lv_PORegel.FabricatieID,ID);
lv_PORegel.SETRANGE(lv_PORegel.Fabricatienr,Fabricatienr);
IF lv_PORegel.FINDFIRST THEN BEGIN
REPEAT
lv_PORegel.HoeveelheidKG := (lv_PORegel.HoeveelheidKG / gv_OudTotaal) * AantalKgTotaal;
lv_PORegel.MODIFY;
UNTIL lv_PORegel.NEXT = 0;
END;
CurrForm.POProductFormuleSub.FORM.RefreshForm;
But when i press the button, the new value gets assigned but the OnValidate doesnt get executed :?:
Is there something wrong with the code, or else how can i get the OnValidate trigger execute after i assign a new value with the button click?
0
Answers