'Custom rows lookup
@param key: the key Field
@param values: the values
@param fields: unused (retained for API compatibility)'

def lookup_rows(self, key, values, fields=[]):

    table = self.table
    count = len(values)
    if (count == 1):
        query = (key == values[0])
    else:
        query = key.belongs(values)
    rows = current.db(query).select(table.id, table.location_id, limitby=(0, count))
    self.queries += 1
    location_id = str(table.location_id)
    location_ids = [row[location_id] for row in rows]
    if location_ids:
        self.location_represent.bulk(location_ids, show_link=False)
    return rows
