NetTalk Central

Author Topic: Validations and popups  (Read 19352 times)

John Hickey

  • Administrator
  • Newbie
  • *****
  • Posts: 47
    • View Profile
    • Email
Validations and popups
« on: June 17, 2007, 03:08:30 PM »
On the Newsgroup, Rudi Havenga asked:

1. How do I execute code when a field is completed to either do a validation
or to assign a value to another field on the same form based on the value of
the entered field?

2. How do I validate a record when the save button is clicked, pop up a
message on the client workstation and return to the update form te let the
user correct his error?


And Bruce Johnson answered:

1. a) set the field to "send new value to server"
b) add the code you want to execute into the "Server code goes here" button.
c) remember in this code to set the SessionValue of anything that you want
to set (including itself).
d) on the client-side tab, set any "fields you want to update" in the "reset
fields" list.
(tip: you can add a field to it's own reset field list if you want to
correct, and resend).

2. see the loginform procedure in example 7 for how to do this.
In ValidateRecord routine
  set loc:invalid = 'fieldthatiswrong'