Difference between revisions of "SET PRERECORD"
Barrymavin (Talk | contribs) (→Example) |
Yvonnemilne (Talk | contribs) (→Example) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
Designate an event-driven trigger procedure to execute prior to the first @...GET | Designate an event-driven trigger procedure to execute prior to the first @...GET | ||
Line 27: | Line 20: | ||
<code lang="recital"> | <code lang="recital"> | ||
procedure disp_memo | procedure disp_memo | ||
− | + | memosay(comp_hist,2,17,15,61) | |
return | return | ||
Line 33: | Line 26: | ||
use payroll alias payroll | use payroll alias payroll | ||
set form to formname | set form to formname | ||
− | set prerecord disp_memo | + | set prerecord to disp_memo |
edit</code> | edit</code> | ||
==Products== | ==Products== | ||
− | Recital | + | Recital |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
[[Category:Set_Commands|PRERECORD]] | [[Category:Set_Commands|PRERECORD]] | ||
+ | [[Category:Screen Forms]] | ||
+ | [[Category:Screen Forms Set Commands]] | ||
+ | [[Category:Triggers]] | ||
+ | [[Category:Triggers Set Commands]] |
Latest revision as of 15:42, 21 August 2018
Purpose
Designate an event-driven trigger procedure to execute prior to the first @...GET
Syntax
SET PRERECORD TO [<procedure-name> | (<expC>)]
See Also
@...GET, CREATE SCREEN, MODIFY SCREEN, SET POSTFORM, SET POSTRECORD, SET PREFORM
Description
The PRERECORD trigger procedure executes a procedure after the record is locked and the data has been read, but before the first @...GET is activated. The SET PRERECORD TO <procedure-name> command defines the procedure or program name to be executed. The filename can be substituted with a <expC>, enclosed in round brackets, which returns a valid filename. The PRERECORD trigger is called when the FORM is first activated with the EDIT, CHANGE, INSERT and APPEND commands. Once the form is active, the [PAGE UP], [PAGE DOWN] and [FIND] keys will call the PRERECORD trigger procedure. The SET PRERECORD TO command clears the active <procedure-name>.
PRERECORD triggers are table specific, and will execute before @...GETs in the same table are activated. A form which contains records from different tables may employ PRERECORD triggers from each represented table. Table fields, for example, may activate a different POSTRECORD trigger for each parent child relationship. The SET PRERECORD trigger can also be defined from within the SCREEN PAINTER work surface. The PRERECORD procedure option from the TRIGGERS menu is used to define the trigger name. The [HELP] key may be pressed here to edit the trigger file from inside the SCREEN PAINTER.
Example
procedure disp_memo memosay(comp_hist,2,17,15,61) return select 1 use payroll alias payroll set form to formname set prerecord to disp_memo edit
Products
Recital