Hi, In a table I need to change the field value (name: cadastro, type: datetime) to request.now depending on the value assigned to another field (name: status) of the same record.
I thought of using the _before_update callbcak for this purpose: db.solicitacao._before_update.append(lambda f: f.cadastro=request.now if (f.status == 'Edição') or (f.status =='Enviado') else None) Thus returns the message "*lambda cannot contain assignment*" Any suggestions? Thanks in advance, Fabiano. -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.