Page 1 of 1

Required fields in Dialog

Posted: Tue May 20, 2008 7:16 pm
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

Posted: Wed May 21, 2008 1:47 pm
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

Thanks

Posted: Wed May 21, 2008 5:56 pm
by Ron San Martino
Jim,

Thanks for the help.

Ron