Hello Anthony,

I think I found the problem. I had generated the table with the wizard
and I had an id field in the table. I removed the id field and the
uuid didn't show in the form anymore. I assume you either have an id
field or a uuid field not both. Sorry for my clumsiness, I am a
starter.

Also, thanks for the advice about making sure the web2py_uuid is
called for each individual request.

Thanks very much for your help, it is awesome to get sound answers so
quickly in this forum.

Regards,

Clara

On Oct 30, 12:28 pm, Anthony <[email protected]> wrote:
> Are you saying Field('uuid', default=web2py_uuid(), readable=False,
> writable=False) doesn't hide the field (it should)? Can you show more code?
>
> Also, note that default=web2py_uuid() will only set the default value once
> per request, so if your code happens to insert multiple records in the same
> request, they will get the same uuid. If you want the default to be a
> function that gets called once for each insert, then just pass the function
> itself as the default, rather than calling the function:
>
> default=web2py_uuid
>
> or
>
> default=lambda: web2py_uuid()
>
> Anthony
>
>
>
>
>
>
>
> On Sunday, October 30, 2011 11:18:03 AM UTC-4, clarix wrote:
>
> > Hello,
>
> > I added an uuid field to my tables to allow to merge dababases:
>
> > Field('uuid',default=web2py_uuid(),writable = False),
>
> > The problem I find is that the uuid field now shows in the crud.create
> > forms. I tried to set the uuid readable property to
> > False but in doing so the crud.create form not only shows the uuid
> > field but it also allows editing the field.
>
> > I would appreciate any help on this. Many thanks!
>
> > Clara

Reply via email to