Re: [web2py] appadmin database administration fails when trying to edit record

2019-06-07 Thread David Manns
Yes, I'm pretty sure it worked fine with 2.14.6! On Friday, June 7, 2019 at 5:42:12 PM UTC-4, Dave S wrote: > > > > On Friday, June 7, 2019 at 8:43:43 AM UTC-7, David Manns wrote: >> >> It turns out the orderby is redundant. >> >> Field('Account', 'reference CoA', requires=IS_IN_DB(db, 'CoA.id

Re: [web2py] appadmin database administration fails when trying to edit record

2019-06-07 Thread Dave S
On Friday, June 7, 2019 at 8:43:43 AM UTC-7, David Manns wrote: > > It turns out the orderby is redundant. > > Field('Account', 'reference CoA', requires=IS_IN_DB(db, 'CoA.id', > '%(Name)s')), > > works the same. In the application smartgrid edit form the Account field > is a dropdown displ

Re: [web2py] appadmin database administration fails when trying to edit record

2019-06-07 Thread David Manns
It turns out the orderby is redundant. Field('Account', 'reference CoA', requires=IS_IN_DB(db, 'CoA.id', '%(Name)s')), works the same. In the application smartgrid edit form the Account field is a dropdown displaying the Name's of the accounts in alphabetic order, no need for the orderby,

Re: [web2py] appadmin database administration fails when trying to edit record

2019-06-06 Thread Ben Duncan
Field('Account', 'reference CoA', requires=IS_IN_DB(db, 'CoA.id', '%(Name)s', orderby=db.CoA.Name)), To me, it looks like you are using "name" to reference the COA, instead of the ID. http://www.web2py.com/books/default/search/29?search=IS_IN_DB *Ben Duncan* DBA / Chief Software Ar

[web2py] appadmin database administration fails when trying to edit record

2019-06-06 Thread David Manns
running Python 2.7, web2py 2.18.5 table: db.define_table('AccTrans', Field('Timestamp', 'datetime', default=request.now, writable=False), Field('Bank', 'reference Bank_Accounts', writable=False),#e.g. PayPal, Cambridge Trust, ... Field('Account', 'reference CoA',