'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)
    ptable = current.s3db.pr_person
    left = ptable.on((ptable.id == table.person_id))
    rows = current.db(query).select(table.id, ptable.id, ptable.pe_label, ptable.first_name, ptable.middle_name, ptable.last_name, left=left, limitby=(0, count))
    self.queries += 1
    return rows
