SAVE GETS

From Recital Documentation Wiki
Revision as of 14:28, 29 May 2009 by Yvonnemilne (Talk | contribs)

Jump to: navigation, search

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
  @0,1 get field4
  // Activate gets in validation procedure
  read
  // Reactivate reads in main screen form
  if not empty(field4)
      set validate on
  endif
  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