ISNOTDUP() Checks for a duplicate field

  <lDup>  => is duplicate field


  Looks in the current DBF for <expCurrent> - an
  expression of any type. [nOrder]  is the index order to SEEK on.
  Default is INDEXORD(). [bCompare]  - in lieu of an index key,
  this block is used in a locate compare of <expCurrent> as in

  LOCATE FOR eval(bCompare)==expCurrent.

  [lBlankOk]    if <expCurrent> is blank, and this is
  .f. (the default), then and automatic .f. is returned.

  [nExceptRec]  if this is passed, will check all BUT
  this record number. Useful for editing routine, where you don't
  wish to check for a duplicate of the existing record.

  [cMsg]  the message displayed if a duplicate is
  found. Default is none.


   @6,0 GET V6 valid   ;
    ISNOTDUP(v6,nil,nil,nil,nil,"Duplicate found")

   @6,0 GET V6 valid   ;
    ISNOTDUP(v6,3,nil,nil,recno(),"Duplicate found")

   @6,0 GET V6 valid  ;
     ISNOTDUP(v6,nil,{||afile->v6},nil,recno(),"Duplicate found")

  Normally for use in making sure a duplicate record is
  not entered.



2 responses to “SP_ISNOTDUP

  1. Pingback: SP Lookup Functions | Viva Clipper !

  2. Pingback: SP Functions | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.