Difference between revisions of "RESTORE GETS"

From Recital Documentation Wiki
Jump to: navigation, search
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
==Class==
 
Screen Forms
 
 
 
 
==Purpose==
 
==Purpose==
 
Restore saved @…GETS
 
Restore saved @…GETS
Line 44: Line 40:
  
 
==Products==
 
==Products==
Recital Mirage Server, Recital Terminal Developer
+
Recital  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
 
[[Category:Screen Forms]]
 
[[Category:Screen Forms]]
 
[[Category:Screen Forms Commands]]
 
[[Category:Screen Forms Commands]]

Latest revision as of 16:15, 12 November 2009

Purpose

Restore saved @…GETS


Syntax

RESTORE GETS [FROM <memvar>]


See Also

@...GET, CLEAR GETS, READ, READVAR(), SAVE GETS


Description

The RESTORE GETS command allows reactivation of @...GETs previously saved with the SAVE GETS command. The optional FROM <memvar> clause can be used to restore GETS from a memory variable. This allows for multiple SAVE and RESTORE GETS. Since the Recital/4GL allows @...GET commands to be specified within a validation routine, you can execute a screen form in a procedure invoked by the @...GET...VALIDATE command. When the validation procedure is terminated, the READ in the calling screen form is reactivated. This process is called nesting reads. The RESTORE GETS command also restores the value returned by the READVAR() function.


Example

// Set up validation procedure
procedure checkit
  parameters check
  save screen
  // Specify SAVE GETS and CLEAR GETS before @...gets
  save gets
  clear gets
  @1,1 get t1
  @3,1 get t3
  read
  // Reactivate reads in main screen form
  restore gets
  restore screen
return
 
@1,1 get field1
@2,1 get field2 when field1="g"
@3,1 get field3 validate with checkit
read


Products

Recital