Hello everyone,

I have two tables defined as such:

#--------
db.define_table('total_ec_numbers',
    Field('id','integer', label=T('ID')),
    Field('query_name','string', label=T('Gene ID')),
    Field('hit_name','string', label=T('Hit name')),
    Field('hit_accession','string', label=T('Hit accession')),
    Field('ec','string', label=T('EC number')),
    Field('hsp_evalue','string', label=T('E-value')),
    Field('hsp_length','string', label=T('HSP length')),
    Field('hsp_percent','string', label=T('HSP percent')),
    Field('sample','string', label=T('Sample')),
    Field('extra','string', label=T('Extra info')),
    migrate=False, format = '%(query_name)s')

db.total_ec_numbers._singular = "EC numbers results"
dbtotal_ec_numbers._plural = "EC numbers results"


#--------
db.define_table('total_genes',
    Field('id','integer', label=T('id')),
    Field('gene_id','string', label=T('Contig')),
    Field('gene_name','string', label=T('Gene name')),
    Field('sequence','text', label=T('Sequence')),
    Field('seq_length','integer', label=T('Sequence length')),
    Field('description', 'reference total_ec_numbers', label=T('Gene ID')),
    Field('sample','string', label=T('Sample')),
    Field('extra','string', label=T('Extra info')),
    migrate=False)

the field 'description' from 'total_genes' has the same values with the 
field 'query_name' from 'total ec numbers' (different number of rows). So i 
want to show the table 'total ec numbers' in a grid and display links to 
the appropriate 'total genes' results for when the 'query name' matches the 
'decription'. I do this by calling a smartgrid:

   
important_columns=[db.total_ec_numbers.query_name,db.total_ec_numbers.hit_name]
    

form=SQLFORM.smartgrid(db.total_ec_numbers, linked_tables=['total_genes'], 
create=False, fields=important_columns, deletable=False, editable=False, 
maxtextlength=64, paginate=10)

and the links appear next to each row but when i click on them the 
displayed table is empty. Plus the displayed table has different fields 
than those in "total genes". For some reason it has those in 
'total_ec_numbers'.

Can you help me out please? What am I missing?

Thank you in advance.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to