Shouldn't that be db.mytable[form.vars.id] ? Marin
On Wed, Jun 5, 2013 at 10:30 AM, Robin Manoli <[email protected]> wrote: > Well still it doesn't work. I notice that the row has yet not been > created. I need to run the function after the row has been created. > > Den tisdagen den 4:e juni 2013 kl. 23:04:36 UTC+2 skrev Niphlod: > >> you are mistaken. request.args(0) is just the first arg of the url >> /appname/controller/function/**this_is_request_args(0). >> >> try form.vars.id instead ^_^ >> >> On Tuesday, June 4, 2013 10:57:36 PM UTC+2, Robin Manoli wrote: >>> >>> I'm trying to use the newly created record after submitting a form. I >>> get the error from myFunc, telling me row is a NoneType. How can I fetch >>> the newly created record? >>> >>> *form = SQLFORM(db.mytable) >>> * >>> *if form.process().accepted: >>> * >>> * row = db.mytable( request.args(0) ) # **request.args(0) should be >>> the id of the newly created record, if I'm not mistaken* >>> * myFunc( row )* >>> >>> >>> -- > > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

