[web2py] Re: Many to many skills matrix
As Alan says, you don't seem to have a score field. Maybe try this: db.define_table('online_team', Field('first_name', notnull=True), Field('last_name', notnull=True), Field('email', requires=IS_EMAIL(), notnull=True, unique=True), Field('initials', notnull=True, unique=True)) format='%(initials)s') db.define_table('skills', Field('skill', notnull=True, unique=True) format='%(skill)s') db.define_table('ownership', Field('initials', db.online_team), Field('skill', db.skills) Field('score', 'integer')) Maybe look at the smartgrid to get something going fast. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Many to many skills matrix
> I have a group of employees and a set of skills. One employee can have > many skills and one skill can be had by many employees. What I want to do > is to represent the skills of all employees in one table, where the score > of each employee in each skill is given on a scale from 0 to 5 like: > I think that given your model, you need a score field in the ownership table so you can retrieve each team member's score for every skill name when filling the score table Then it's matter of building a custom html table with the TABLE helper that probably will involve using nested recordset loops. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.