Difference between revisions of "SET PRERECORD"

From Recital Documentation Wiki
Jump to: navigation, search
 
(Example)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=SET PRERECORD=
 
 
 
==Class==
 
Screen Forms
 
 
 
 
==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 15: Line 8:
  
 
==See Also==
 
==See Also==
SET PREFORM, SET POSTFORM, SET POSTRECORD, @...GET, CREATE SCREEN, MODIFY SCREEN
+
[[@...GET]], [[CREATE SCREEN]], [[MODIFY SCREEN]], [[SET POSTFORM]], [[SET POSTRECORD]], [[SET PREFORM]]
  
  
Line 25: Line 18:
  
 
==Example==
 
==Example==
<pre>
+
<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 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</pre>
+
edit</code>
 
+
  
 
==Products==
 
==Products==
Recital Mirage Server, Recital Terminal Developer
+
Recital  
 +
[[Category:Documentation]]
 +
[[Category:Commands]]
 +
[[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