validation function and continue statement once validated

Mkontwg

Member
Hi team

Can anyone showed me an easier way to continue, once validate function is invoked.

I have used the following validation function for both my username and password;

DEFINE VARIABLE username AS CHARACTER NO-UNDO.
UPDATE username FORMAT "x(6)" BLANK
VALIDATE(username = "mkontwg", " retyped your username")
WITH FRAME username CENTERED SIDE-LABELS.

This is a form on open edge by the way, thanks
 

Osborne

Active Member
Are you looking for an alternative to using UPDATE or that the user name mkontwg is not working?

If the former then make the program event driven using ENABLE instead of UPDATE etc., and you can check field validation using this:
Code:
IF FRAME username:VALIDATE() THEN .....

If it is the latter then change the format for the variable to "x(7)".
 

LarryD

Active Member
Note that it won't work as written with the update statement. I also would strongly suggest calling the frame name something other than the same as the variable name. However I agree with Osborne as using event driven ENABLE .. WAIT-FOR.
.
Should be:
Code:
DEFINE VARIABLE username AS CHARACTER NO-UNDO.
UPDATE username FORMAT "x(6)" BLANK
VALIDATE(input username = "mkontwg", " retyped your username")
WITH FRAME frame-username CENTERED SIDE-LABELS.
 
Top