Since I adjusted a table definition the following code no longer
works:

eventtyperows=db(().\
    select
(db.event.eventtype,distinct=True,orderby=db.event.eventtype)
    eventtypelist=[k['eventtype']for k in eventtyperows]
form=SQLFORM.factory(SQLField('eventtype',requires=IS_IN_SET
(eventtypelist)),
....)


Instead of just keys, I need key-value pairs, this is what I have got
sofar:


eventtyperows=db(db.event.eventtype==db.eventtype.id).\
    select(db.event.eventtype,db.eventtype.eventtype,\
    distinct=True,orderby=db.eventtype.eventtype)
eventtypelist=[k['eventtype']for k in eventtyperows]


event.eventtype contains the keys, eventtype.eventtype contains the
values that should be displayed in the drop box. How do I proceed from
here, to create an drop box.


Kind regards,

Annet.



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to