I would like to have it on insert. Like for example a mouvement number that start with 100 not 1 as is the case for id. I have foud another alternative in fiorm.accepts(): def index(): """ example action using the internationalization operator T and flash rendered by views/default/index.html or views/generic.html """ form = SQLFORM(db.bs) if form.accepts(request.vars,session): db(db.bs.id==form.vars.id).update(Numero=db.bs.id + 100); return dict(form=form)
But I still cannot declare Number as not null and unique. On Monday, August 13, 2012 4:06:57 AM UTC, Massimo Di Pierro wrote: > > Do you mean something like this? > > db(query).update(field = db.table.field+value) > > On Friday, 10 August 2012 10:46:54 UTC-5, tigmmi wrote: >> >> Is there a way to add an autoincremente field with a specific first >> value. Compute won't work with id + number. > > --