select TheTable local sCollate sCollate = set('Collate') set Collate to 'Machine' index on bintoc(val(sys(2007, ThePath))) tag ThePath set Collate to (sCollate)Next, create a function to help you finding out whether something is in
*-------------------------------------------------------------------------- function IsItIn(PathToFind, TheTable) local IndexedKey, s, OldOrder, sCollate, FoundIt s = select(0) select (TheTable) OldOrder = order() sCollate = set('Collate') set Collate to 'Machine' IndexedKey = bintoc(val(sys(2007, PathToFind))) set Order to ThePath =seek(IndexedKey) FoundIt = FALSE scan rest for ( bintoc(val(sys(2007, ThePath))) == IndexedKey ) if( ThePath == PathToFind ) FoundIt = TRUE exit endif endscan set order to &OldOrder select (s) set Collate to (sCollate) return FoundIt && and still on the record endfunc *--------------------------------------------------------------------------