Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Artful Two for Clipper 5.0 - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

Syntax

EXIST( pTarget[, cTable[, nKey_no ;
       [, xcUdf[, lShow_mesg ]]]]] )

Purpose

Validate input by checking existence in an open table.

Arguments

     pTarget -- item to look up

     cTable -- alias of table to search; defaults to current table

     nKey_no -- index order number to use; defaults to current one

     xcUdf -- if passed and target is found, udf to execute (by
                  macro-expansion) or code block to evaluate

     lShow_mesg -- if passed and .T., show a message if target not
                       found; defaults to .T.

Setup

cTable is open and indexed. xcUdf is a valid, linked function.

Example

     LOCAL mAccount_no := SPACE( 5 )
     USE CUSTOMER INDEX CUSTOME3
     @ 5, 10 GET mAccount_no VALID EXIST( mAccount_no )

Returns

.F. if not found, else result of xcUdf if passed, else .T.

Side Effects

If cTable is not open, the program will crash.

Artful Calls

PUSH/POP_QUERY, NOFINDMESG, GET_ORDER, POP_MSG

Source File

AA_EXIST.PRG

See Also: DB_CHECK() HELP_FILL() SEEK_REL()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson