Hi Louis
There is indeed a way and it is one of the great features of NetTalk - Immediate Validation. This property is set to 'Yes' by default for fields and it means that you can test the validity of a field immediately after the user completes that field.
If you look at your field properties you will find a tab called 'Client Side', there you can tick 'Send new value to server' and press 'Server Code' and you can enter your editing code. If the field is in error (then you can set a message and set other fields (if say a percentage discount was too high you can reset to the standard discount and recalculate the net value).
There are two other things to do: insert any fields that could be changed as a result of your editing in the 'Reset' box and check 'Value' (what you want to re-display) and reload the session variable. So, in the case of the invalid discount you would recalculate the net value based on the standard discount and reset.
Also, while the field that you are dealing with will have its value placed in the session variable if you are going to do calculations with other fields don't forget to load them up into the file variables from the current session values.
In the discount example, say there were three fields: gross, discount and net - the Server Code for the editing of the Discount field might look like this:
if SAL:discount > 0.3
SAL:Gross = p_web.gsv('SAL:Gross')
SAL:discount = .25
SAL:Net = SAL:Gross * (1 - SAL:Discount)
SAL:Message = 'Discount cannot be greater then 30%, reset to default')
p_web.ssv('SAL:Net',SAL:Net)
p_web.ssv('SAL:Gross',SAL:Gross)
p_web.ssv('SAL:Discount',SAL:Discount)
p_web.ssv('SAL:Message',SAL:Message)
END
And you would insert all of the fields into the Rest box and get immediate response to an invalid entry.
Cheers
Keith