def skill_competencies():
 table = s3db.hrm_skill
 ttable = s3db.hrm_skill_type
 rtable = s3db.hrm_competency_rating
 query = (((table.id == request.args[0]) & (table.skill_type_id == ttable.id)) & (rtable.skill_type_id == table.skill_type_id))
 records = db(query).select(rtable.id, rtable.name, orderby=(~ rtable.priority))
 response.headers['Content-Type'] = 'application/json'
 return records.json()

def skill_competencies ( ) : table = s3db . hrm_skill ttable = s3db . hrm_skill_type rtable = s3db . hrm_competency_rating query = ( ( ( table . id == request . args [ 0 ] ) & ( table . skill_type_id == ttable . id ) ) & ( rtable . skill_type_id == table . skill_type_id ) ) records = db ( query ) . select ( rtable . id , rtable . name , orderby = ( ~ rtable . priority ) ) response . headers [ 'Content-Type' ] = 'application/json' return records . json ( )
called by s3optionsfilter to provide the competency options for a particular skill type .