Difference between revisions of "SET VALIDATE"

From Recital Documentation Wiki
Jump to: navigation, search
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=SET VALIDATE=
 
 
 
==Class==
 
Screen Forms
 
 
 
 
==Purpose==
 
==Purpose==
 
Signify that data entered in a field on a form has passed validation checks
 
Signify that data entered in a field on a form has passed validation checks
Line 19: Line 12:
  
 
==Description==
 
==Description==
The SET VALIDATE ON command is used to signify that data entered in a field on a form, which was specified with the @...GET VALIDATE WITH <procedure> command, has passed validation checks.  The SET FIELDVAL command can be used to modify the contents of the field on the form.  The validation procedure will only be called if data is entered in the field on the form, or the [HELP] key is pressed.  See @...GET VALIDATE WITH for full details.
+
The SET VALIDATE ON command is used to signify that data entered in a field on a form, which was specified with the @...GET VALIDATE WITH <procedure> command, has passed validation checks.  The SET FIELDVAL command can be used to modify the contents of the field on the form.  The validation procedure will only be called if data is entered in the field on the form, or the [HELP] key is pressed.  See [[@...GET|@...GET VALIDATE WITH]] for full details.
  
  
 
==Example==
 
==Example==
<pre>
+
<code lang="recital">
 
procedure check_event
 
procedure check_event
parameter s
+
  parameter s
select b
+
  select b
seek s
+
  seek s
if not found()
+
  if not found()
set fieldval to "BALLET"
+
      set fieldval to "BALLET"
endif
+
  endif
select a
+
  select a
set validate on
+
  set validate on
 
return
 
return
  
@10,10 say "Event ";
+
@10,10 say "Event " get event;
get event;
+
  must_enter;
must_enter;
+
  validate with check_event
validate with check_event
+
read
read</pre>
+
</code>
  
  
 
==Products==
 
==Products==
Recital Mirage Server, Recital Terminal Developer
+
Recital  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
 
[[Category:Set_Commands|VALIDATE]]
 
[[Category:Set_Commands|VALIDATE]]
 +
[[Category:Screen Forms]]
 +
[[Category:Screen Forms Set Commands]]

Latest revision as of 15:53, 25 November 2009

Purpose

Signify that data entered in a field on a form has passed validation checks


Syntax

SET VALIDATE ON | OFF | (<expL>)


See Also

@...GET, MENU AT, SET FIELDVAL


Description

The SET VALIDATE ON command is used to signify that data entered in a field on a form, which was specified with the @...GET VALIDATE WITH <procedure> command, has passed validation checks. The SET FIELDVAL command can be used to modify the contents of the field on the form. The validation procedure will only be called if data is entered in the field on the form, or the [HELP] key is pressed. See @...GET VALIDATE WITH for full details.


Example

procedure check_event
  parameter s
  select b
  seek s
  if not found()
      set fieldval to "BALLET"
  endif
  select a
  set validate on
return
 
@10,10 say "Event " get event;
  must_enter;
  validate with check_event
read


Products

Recital