>lparameter lcValue && character value to check >local lcOldExact >lcOldExact=set('exact') && Save current settings >set exact on && To perform exact match >if !empty(this.CursorName) and !empty(lcValue) and type('lcValue')='C' > if seek(lcValue,this.CursorName, 'Code') && Check if it's duplicate > =messagebox('There is a duplicate! '+lcValue+ ; > ' will not be added!',48,'Warning') > <strong>return .f.</strong> > endif >endif >set exact &lcOldExact && Restore old settings >return .t. >>
>LPARAMETERS lcValue && character value to check >LOCAL llReturn >llReturn = .T. >IF !EMPTY(this.CursorName) and !EMPTY(lcValue) and VarType(lcValue)='C' > IF SEEK(PADR(lcValue,LEN(FieldName)),this.CursorName, 'Code') > =MessageBox('There is a duplicate! '+lcValue+ ; > ' will not be added!',48,'Warning') > llReturn = .F. > ENDIF >ENDIF >RETURN llReturn >>