the SQLFORM form inserting a record - how to access the new record's id??

27 views
Skip to first unread message

Vlad

unread,
May 30, 2019, 4:05:08 PM5/30/19
to web2py-users
form = SQLFORM(db.person)
   if form.process().accepted:
...............................................


How can I access the id of the record inserted into the db by the form? 

Vlad

unread,
May 30, 2019, 4:45:14 PM5/30/19
to web2py-users
Oops, just found an answer here by Anthony from 8 years ago about form.vars.id :)
Thank you, Anthony!

Dave S

unread,
May 30, 2019, 6:23:53 PM5/30/19
to web2py-users


On Thursday, May 30, 2019 at 1:45:14 PM UTC-7, Vlad wrote:
Oops, just found an answer here by Anthony from 8 years ago about form.vars.id :)
Thank you, Anthony!

Thumbs up -- that you found the answer, and also because I'm often appreciating Anthony's efforts.

/dps

Reply all
Reply to author
Forward
0 new messages