That worked, thanks. I took the computed field route. For other newbies 
like me, this is my code, for the time being very simple, but shows what I 
am doing:

def reserve_org_id(row):
    return random.randint(0, 10000)

db.define_table(
    auth.settings.table_user_name,
...
    Field('org_id',               'integer',  compute=reserve_org_id),
...
    format='%(first_name)s %(last_name)s')

I guess the other option would be very similar (I guess the function is 
also called with a row object - it is not specified in the documentation)

On Tuesday, June 26, 2012 1:23:19 AM UTC+2, Anthony wrote:
>
> You could make org_id a computed 
> field<http://web2py.com/books/default/chapter/29/6#Computed-fields>. 
> Or maybe set readable and writable to False and specify a default value 
> (which can be a function).
>
> Anthony
>
>

-- 



Reply via email to