Difference between revisions of "SAVE GETS"

From Recital Documentation Wiki
Jump to: navigation, search
Line 1: Line 1:
=SAVE GETS=
 
 
 
 
==Class==
 
==Class==
 
Screen Forms
 
Screen Forms
Line 15: Line 12:
  
 
==See Also==
 
==See Also==
[[@...GET]], [[CLEAR GETS]], [[RESTORE GETS]], [[RESTORE SCREEN]], [[SAVE SCREEN]], [[FMT()]]
+
[[@...GET]], [[CLEAR GETS]], [[FMT()]], [[READ]], [[RESTORE GETS]], [[RESTORE SCREEN]], [[SAVE SCREEN]]
  
  
Line 29: Line 26:
 
// Set up validation procedure
 
// Set up validation procedure
 
procedure checkit
 
procedure checkit
parameters check
+
  parameters check
save screen
+
  save screen
// Specify SAVE GETS and CLEAR GETS before @...gets
+
  // Specify SAVE GETS and CLEAR GETS before @...gets
save gets
+
  save gets
clear gets
+
  clear gets
@1,1 get t1
+
  @1,1 get t1
// Activate gets in validation procedure
+
  // Activate gets in validation procedure
read
+
  read
// Reactivate reads in main screen form
+
  // Reactivate reads in main screen form
restore gets
+
  restore gets
restore screen
+
  restore screen
 
return
 
return
  

Revision as of 13:40, 26 May 2009

Class

Screen Forms


Purpose

Save status of current GETS


Syntax

SAVE GETS [TO <memvar>]


See Also

@...GET, CLEAR GETS, FMT(), READ, RESTORE GETS, RESTORE SCREEN, SAVE SCREEN


Description

The SAVE GETS command lets you save a description of the GETS in the current screen form for subsequent retrieval by the RESTORE GETS command. Since the Recital/4GL allows @...GET commands to be specified within a validation routine, the SAVE GETS command is particularly useful in letting you 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.

TO <memvar>

The optional TO <memvar> clause can be used to save the active GETS to a memory variable. This allows for multiple SAVE and RESTORE GETS.


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
  // Activate gets in validation procedure
  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 Mirage Server, Recital Terminal Developer