Required fields in Dialog

Got a problem you cannot solve? Try here.
Post Reply
Ron San Martino
Posts: 5
Joined: Tue May 20, 2008 7:08 pm

Required fields in Dialog

Post by Ron San Martino »

Hello,
I have created a dialog that has 3 required fields, i.e. each must have some text in it. I added 3 Object Rules:
IF (Field1.Text = ) THEN Next.Enabled := False;
IF (Field2.Text = ) THEN Next.Enabled := False;
IF (Field3.Text = ) THEN Next.Enabled := False;

If a field is empty, the Next button is disabled. However, once text is re-entered, I haven't been able to figure out how to enable the Next field.

I need to add a rule like:
If ((Field1.Text = ) AND (Field2.Text = ) AND (Field3.Text = )) THEN Next.Enabled := False
else
Next.Enabled : True;


Thanks for any help.

Ron
jimo
Posts: 342
Joined: Fri Aug 19, 2005 10:59 am
Location: Atlanta, GA
Contact:

Post by jimo »

IN you example you are saying that if any text filed (1,2 or 3) has a value then next should be enabled. If this is correct then below your 3 lines add these three lines:
IF (Field1.Text <> ) THEN Next.Enabled := True;
IF (Field2.Text <> ) THEN Next.Enabled := True;
IF (Field3.Text <> ) THEN Next.Enabled := True;

If you want it to check for each filed having a value then in the script do something like:


label:My Specific Values
Set Variable VAR1 to
Set Variable VAR2 to
Set Variable VAR3 to
Display Dialog:MySpecificValues
Evaluate Expression $VAR1$ = "" or $VAR2$ = "" or $VAR3$ = "" into variable REDO
if Variable REDO Equals TRUE
GoTo Label: My Specific Values
endif
Jim Oswell
Software Engineering Manager, Dental
Greenway Health, LLC
http://greenwaymedical.com
Ron San Martino
Posts: 5
Joined: Tue May 20, 2008 7:08 pm

Thanks

Post by Ron San Martino »

Jim,

Thanks for the help.

Ron
Post Reply