The default can be a lambda, but I don't think it can take any arguments 
(e.g., the row or row id), so instead you would probably have to use a 
computed field. Note, if you also want to be able to write your own values 
to the computed field, you can do that too -- it only calculates the 
computed value when no value is given. By default, computed fields are not 
shown in SQLFORMs, but you can override that by explicitly listing the 
fields to be included in the form.

Anthony

On Thursday, December 1, 2011 11:23:46 PM UTC-5, Matthew wrote:
>
> Is it possible to define a default field value using lambda like the a
> Computed Field? http://web2py.com/book/default/chapter/06#Computed-Fields
>
> I want to name nodes using their own ID fields, e.g., "Node 1", "Node
> 2", etc. Can I do this with lambda and not rely on a separate counter
> field?
>
> Thanks,
> Matthew
>
>

Reply via email to