Difference between revisions of "ON READERROR"

From Recital Documentation Wiki
Jump to: navigation, search
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=ON READERROR=
 
 
 
==Class==
 
Screen Forms
 
 
 
 
==Purpose==
 
==Purpose==
 
Execute specified command when a data entry error occurs
 
Execute specified command when a data entry error occurs
Line 25: Line 18:
 
<code lang="recital">
 
<code lang="recital">
 
procedure readtrap
 
procedure readtrap
dialog box "Date is out of range"
+
  dialog box "Date is out of range"
 
return
 
return
  
Line 31: Line 24:
 
on readerror do readtrap
 
on readerror do readtrap
 
@10,00 say "Enter Date" get dToday;
 
@10,00 say "Enter Date" get dToday;
range {01/01/2000},{01/01/2005}
+
  range {01/01/2000},{01/01/2005}
 
read
 
read
 
on readerror
 
on readerror
Line 38: Line 31:
  
 
==Products==
 
==Products==
Recital Mirage Server, Recital Terminal Developer
+
Recital  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
 +
[[Category:Screen Forms]]
 +
[[Category:Screen Forms Commands]]
 +
[[Category:Error Handling and Debugging]]
 +
[[Category:Error Handling and Debugging Commands]]

Latest revision as of 15:55, 12 November 2009

Purpose

Execute specified command when a data entry error occurs


Syntax

ON READERROR [<command>]


See Also

@...GET, APPEND, BROWSE, CHANGE, EDIT, ON ERROR, READ


Description

The ON READERROR command executes the specific <command> when a data entry error is made. Data entry errors are: invalid dates, number out of range, failed VALID condition. ON READERROR can be used to replace the default error messages that are given when these errors occur. If no <command> is specified with the ON READERROR command, any previously issued ON READERROR setting is cancelled.


Example

procedure readtrap
  dialog box "Date is out of range"
return
 
dToday = date()
on readerror do readtrap
@10,00 say "Enter Date" get dToday;
  range {01/01/2000},{01/01/2005}
read
on readerror


Products

Recital