On 29 May 2010 03:38, Candid <[email protected]> wrote:
> db.your_table.your_field.requires = IS_IN_DB(db, 'person.id', '%
> (name)s', orderby='person.name'))
>
> On May 28, 9:38 am, David Marko <[email protected]> wrote:
>> Is there a way, how to specify order(sorting) in IS_IN_DB ? Its easy
>> to use it for validator and let web2py to generate combobox. How can I
>> specifiy 'order' form db query, so dropdown items are in good order?
>> Something like  db().select(db.person.ALL, orderby=db.person.name) ?

I have tried

                      requires = IS_IN_DB(db, 'joernaal.id',
                                          '%(titel)s',
                                          orderby = db.joernaal.titel.lower(),
                                          groupby = db.joernaal.titel.lower())

but I still get an unsorted list.

Why?

Regards
Johann




-- 
 May grace and peace be yours in abundance through the full knowledge
of God and of Jesus our Lord!  His divine power has given us
everything we need for life and godliness through the full knowledge
of the one who called us by his own glory and excellence.
                                                    2 Pet. 1:2b,3a

Reply via email to