def patient_lookup():
db.consumer.id.readable=False
var = request.args(0)
grid = []
links=[lambda row: A('Note',_href=URL('default', 'notes',args=[row.id
])),
lambda row: A('Diagnosis',_href=URL('default', 'diagnosis_lookup'
,args=[row.id])),
lambda row: A('Orders',_href=URL('default', 'phys_order',args=[
row.id]))]
form = FORM("Last Name: ",INPUT(_name='lname'),INPUT(_type='submit'))
if form.accepts(request.vars, session):
query=(db.consumer.lname.like(form.vars.lname+'%'))
grid=SQLFORM.grid(query, deletable=False, searchable=False, create=
False, csv=False, paginate=5, links=links, user_signature=True, headers={
'consumer.lname':'Last Name','consumer.fname':'First Name','consumer.stayte'
:'State','consumer.h_phone':'Home Phone','consumer.c_phone':'Cell Phone',
'consumer.adm_date':'Admission Date','consumer.dob':'Birth Date',
'consumer.pod':'Birth Place'})
return dict(form=form, grid=grid)
The behavior its showing is that when I hit submit, it'll bring back the
first page of records, When I hit the link for another page, the grid will
just show the [] that I have on the 4th line. I would get rid of it but the
page breaks without it.When I hit the submit button again, the grid will
show the page that I wanted to see before. I hit the link for another page
and just "[]" again. And so on....
--
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.