can't get any of the syntax to work, any hints from this attempt below? 
(have simplified and removed concatenation)

  Field('personDisplayName', default=lambda r: r'%(first_name)%s')

On Friday, November 15, 2013 5:52:03 PM UTC-8, Alex Glaros wrote:
>
> which ones of those will only work on new record and which ones will work 
> on existing records?
>
> On Friday, November 15, 2013 5:27:58 PM UTC-8, 黄祥 wrote:
>>
>> i think in compute you must put the row on it (both first_name and 
>> last_name) and not sure it can handle string:
>> e.g. not tested
>> Field('personDisplayName', compute=lambda r: r[first_name] r[last_name])
>>
>> another suggestion why not use default? 
>> or maybe after_insert callback to update the persondisplayname with the 
>> combination first_name and last_name value? 
>> or maybe use on form validation function, assigned the value of 
>> persondisplayname base on first_name and last_name form field?
>>
>> best regards,
>> stifan
>>
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to