Hello,

I'm new to web2py, so I hope that my first question isn't too crazy.

Perhaps I shouldn't even be trying to do this in the DAL (or at all),
but what I would like to do is create auto-incrementing unique fields
for certain tables, but I do not necessarily want them to be primary
keys.

For example, I have a table "quote" and I would like to be able to
refer to a given quote as something like "Q100003". The actual primary
key (id) of the row for that quote may be just plain "3", but it's not
convenient to refer to a quote that way in emails, etc.

I tried to create a computed field using the id of the row, such that
the field would be equal to 'Q' + (id + 100000). I tried about 50
permutations of lambda to make this work with no luck, but I'm
thinking now that it's probably the wrong approach.

Any advice would be greatly appreciated.

>Jeff



Reply via email to