I think it does not show because you overwrite the variable at every iteration I would try something like this
def index(): key=request.vars.baton records = {} for tablename in db.tables: table=db[tablename] fields=[table[fieldname] for fieldname in table.fields] queries=[field.like('%'+key+'%') for field in fields if field.type in ['text','string']] query=reduce(lambda x,y: x|y,queries) records[tablename]=db(query).select() return dict(records) It should display a list of records that match by any field without duplicates --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---