Difference between revisions of "SET PRERECORD"

From Recital Documentation Wiki
Jump to: navigation, search
(Example)
Line 27: Line 27:
 
<code lang="recital">
 
<code lang="recital">
 
procedure disp_memo
 
procedure disp_memo
memosay(comp_hist,2,17,15,61)
+
    memosay(comp_hist,2,17,15,61)
 
return
 
return
  
Line 35: Line 35:
 
set prerecord disp_memo
 
set prerecord disp_memo
 
edit</code>
 
edit</code>
 
  
 
==Products==
 
==Products==

Revision as of 13:14, 12 March 2009

SET PRERECORD

Class

Screen Forms


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 disp_memo
edit

Products

Recital Mirage Server, Recital Terminal Developer