Hello web2py freaks, In my first try to make an application with web2py i have a little struggle how to accomplish as what is would like to see. In db1.py i created a field like this:
db.define_table('jobticket', Field('ticket', 'integer', default = +1) # ticket needs to be ticket +1 when inserted ) I need to have something called "ticket" what represent a number where my other tables are linked to. I know that the default id is auto increment, and i can reference it, so that's not the point. The ticket is a number what i needs to be set like : 150000001. And that needs to be inserted +1 if there is a new job. 15 is a year, the rest is just a number. So, i have 2 problems: - if there is a new year like 1 january 2016, the first two numbers needs to be changed from 15 to 16? - And how can i get the max number out of the database and insert that with a new value( +1) Does anybody have a good insperation or an good idea to get me on the right track? Many thanks. Bart -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.