I have this db definition:

db.define_table('status',
                                SQLField('name'),
                                SQLField('sort_order', 'integer'))

I've inserted sample values like:

if len(db().select(db.status.ALL)) == 0:
    db.status.insert(name='New', sort_order=1)
    db.status.insert(name='Assigned', sort_order=2)
    db.status.insert(name='Open', sort_order=3)
    db.status.insert(name='Work In Progress', sort_order=4)
    db.status.insert(name='Closed', sort_order=5)

Then in the controller:

status_values={}
for status in db().select(db.status.ALL,
orderby=db.status.sort_order):
    status_values[status.id]=status.name

    form=FORM(TABLE(TR("Status:", status_values.values()[0])))

When I run this as web2py, I get New; but when I run this in google
appengine, I get Closed. I am not able to figure this out. Can anyone
help me?

I want to display the first value.

Thanks,
Joseph


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to