Try:

SQLFORM(db.t_account).process(next=URL('account', 'index', args='t_account') 
+ '/[id]')

If you put the variable name in brackets, it (plus the brackets) should get 
replaced with the variable's value.

Also, .process (and .validate) take an "onsuccess" argument, which can be a 
callable:

SQLFORM(...).process(...,
    onsuccess=lambda form: redirect(URL('account', 'index', args=[
't_account', form.vars.id])))

Anthony

On Wednesday, September 5, 2012 2:41:44 PM UTC-4, Philip Kilner wrote:
>
> Hi,
>
> I'm trying to wean myself of CRUD and am doing an insert with 
> SQLFORM.process().
>
> I want to redirect on success to view the newly inserted record.
>
> How can I access the ID of the new record in this context? 
>
> Hoped I could do something like: -
>
> SQLFORM(db.t_account).process(next=URL(c='account',f='index', 
> args=['t_account', id]))
>
> --
>
> Cheers,
>
> PhilK
>
>

-- 



Reply via email to