'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=[]):

    ttable = self.table
    ctable = current.s3db.hrm_course
    left = [ctable.on((ctable.id == ttable.course_id))]
    if (len(values) == 1):
        query = (key == values[0])
    else:
        query = key.belongs(values)
    rows = current.db(query).select(ttable.id, ctable.name, left=left)
    self.queries += 1
    return rows
