Filtrar en un bucle

Si tienes que recorrer todo el contenido de una gran tabla… quizás te compense poner un filtro previo que acelere la busqueda. Mira HFILTER:

SearchKey is string
mycity is string

mycity = "MONTPELLIER"
SearchKey = HFilter(Customer, "CITY='" + mycity + "'")
HReadFirst(Customer, SearchKey)
WHILE HOut() = False
// Process the record 
...
HReadNext(Customer, SearchKey)
END
// Cancels the filter
HDeactivateFilter(Customer)