May I add that this is the function to list the Table of Contents for
a "notebook":

def entries():
#return the notebook itself
    #records=cynotedb(cynotedb.entry.notebook==request.vars.notebook)\
    #         .select(orderby=cynotedb.entry.title)
    records=cynotedb(cynotedb.entry.notebook==request.vars.notebook)\
            (cynotedb.entry.notebook==cynotedb.notebook.id)\
            (cynotedb.notebook.archived==False)\
            .select(cynotedb.entry.ALL,orderby=~cynotedb.entry.id)
    form=SQLFORM(cynotedb.entry,fields=['notebook'])
    return dict(form=form, records=records)

Currently, if cynotedb.notebook.archived== False, the notebook
contents will not be listed but will still be present as an option in
the form (form=SQLFORM(cynotedb.entry,fields=['notebook'])), the main
reason I see is that the form uses the notebook field in the entry
table, not notebook table.

Hence, is there anyway to put a selection within SQLFORM function?

Thanks
Maurice
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to