Difference between revisions of "SAVE GETS"
Yvonnemilne (Talk | contribs) |
Helengeorge (Talk | contribs) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
Save status of current GETS | Save status of current GETS | ||
Line 15: | Line 8: | ||
==See Also== | ==See Also== | ||
− | [[@...GET]], [[CLEAR GETS]], [[ | + | [[@...GET]], [[CLEAR GETS]], [[FMT()]], [[READ]], [[RESTORE GETS]], [[RESTORE SCREEN]], [[SAVE SCREEN]] |
Line 29: | Line 22: | ||
// 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 |
− | @ | + | @0,1 get field4 |
− | // 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 | + | if not empty(field4) |
− | restore screen | + | set validate on |
+ | endif | ||
+ | restore gets | ||
+ | restore screen | ||
return | return | ||
− | @1,1 get field1@2,1 get field2 | + | @1,1 get field1 |
− | when field1="g" | + | @2,1 get field2 when field1="g" |
@3,1 get field3 validate with checkit | @3,1 get field3 validate with checkit | ||
read | read | ||
Line 50: | Line 46: | ||
==Products== | ==Products== | ||
− | Recital | + | Recital |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
+ | [[Category:Screen Forms]] | ||
+ | [[Category:Screen Forms Commands]] |
Latest revision as of 16:34, 12 November 2009
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