` Printed Icetips Article

Icetips Article



Par2: Embed for additional form field validation
1998-07-11 -- Valentine Russev
 
>I have a form and I want to do some additional validations before I allow
>the window to close and update the record.

In ThisWindow.TakeCompleted,  Priority 2800 try something like this:

  IF YourTestFailed
     IF YouWantToStayInTheForm
         RETURN Level:Benign
     ELSIF YouWantToCancelWithoutSave
         SELF.SetResponse(RequestCancelled)
         SELF.CancelAction = Cancel:Cancel
         RETURN Level:Benign
     ELSIF YouWantToSaveAnyway
         !Do Nothing
  END

Steve Gallifant notes:
My usual method is to embed the code in Accepted for the OK button (priority
first) and then CYCLE to keep the OK from processing.



Printed May 4, 2024, 9:42 pm
This article has been viewed/printed 35114 times.