Difference between revisions of "FOUND()"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Function to return whether a record was found
 
Function to return whether a record was found
 
  
 
==Syntax==
 
==Syntax==
 
FOUND([<workarea | alias>])
 
FOUND([<workarea | alias>])
 
  
 
==See Also==
 
==See Also==
[[BOF()]], [[CONTINUE]], [[EOF()]], [[FIND]], [[LOCATE]], [[LOOKUP()]], [[RLOOKUP()]], [[SEEK]], [[SEEK()]]
+
[[BOF()]], [[EOF()]], [[LOCATE]], [[LOOKUP()]], [[RLOOKUP()]], [[SEEK]], [[SEEK()]]
 
+
  
 
==Description==
 
==Description==
The FOUND() function returns .T. if a FIND, SEEK, LOCATE or CONTINUE operation was successful.  The FOUND() function returns .F. if one of the above operations fails.  If the optional <workarea/alias> is specified, then the function will operate in the required workarea.  The FOUND() function should be used with the SEEK, FIND, LOCATE or CONTINUE commands for testing the success or failure of the operation.
+
The FOUND() function returns .T. if a SEEK or LOCATE operation was successful.  The FOUND() function returns .F. if the operation fails.  If the optional <workarea/alias> is specified, then the function will operate in the required workarea.  The FOUND() function should be used with the SEEK command for testing the success or failure of the operation.
 
+
  
 
==Example==
 
==Example==
Line 27: Line 23:
 
</code>
 
</code>
  
 
==Products==
 
Recital Server, Recital
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 +
[[Category:Cursor Functions]]

Latest revision as of 04:48, 7 December 2012

Purpose

Function to return whether a record was found

Syntax

FOUND([<workarea | alias>])

See Also

BOF(), EOF(), LOCATE, LOOKUP(), RLOOKUP(), SEEK, SEEK()

Description

The FOUND() function returns .T. if a SEEK or LOCATE operation was successful. The FOUND() function returns .F. if the operation fails. If the optional <workarea/alias> is specified, then the function will operate in the required workarea. The FOUND() function should be used with the SEEK command for testing the success or failure of the operation.

Example

use accounts
set index to acc_no
seek "00751"
if found()
    change noclear
else
    dialog box "Customer not found."
endif