You have to do it in two steps

max_id=db(db.table.questionary_id==1).select
(db.table.question_number,orderby=~db.question.number,limitby=
(0,1)).first().question_number
db.table.insert(....,question_number=max_id+1)

and make sure that one user at the time is editing this one
questionary.

On Sep 26, 4:45 pm, ProfessionalIT <[email protected]> wrote:
> >         Question Number = 02 (get the last(max)(where the questionary_id=1) 
> > value of this field + 1)
>
>  Well, in a crud create form I have this questionary_id, it is shown
> how a html select field.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to