depends on how you try to access the row. as soon as process().accepted is passed, the row gets inserted to the table. it isn't committed yet, but if you don't do strange stuff it will be available.
Il giorno mercoledì 5 giugno 2013 10:30:32 UTC+2, Robin Manoli ha scritto: > > 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.

