Thanks Alex in fact the join resolve this problem. Then putting only l1.categories.name and l2.categories.name in the grid it looks fine. But now in the details view I have the l1_categories.id instead of the name. query = db.l1_categories.id==db.l2_categories.l1_category fields = (db.l1_categories.name,db.l2_categories.name) grid = SQLFORM.grid(query=query, fields=fields, csv=False, links_in_grid =False, links=None, searchable=False, editable=True, deletable=False, create =True, details=False)
Do you have a suggestion? Regards. Il giorno mercoledì 21 gennaio 2015 19:01:17 UTC+1, Alex Glaros ha scritto: > > hi Gael, > > I think you have to do a join in your query to l1 table to add that field > to grid so it can be searched on. Otherwise, w2p only sees the primary key > id in l1. > > Alex > -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.