Thanks thats great!

On Friday, 5 May 2017 13:08:41 UTC+1, 黄祥 wrote:
>
> i think you can use conditional if else to check 
> form.vars.delete_this_record
> *e.g.*
> def onupdate_event(form, table):
> time_stamp = request.now
> client_ip = request.client
> user_id = auth.user_id
> origin = '%s/%s' % (request.controller, request.function) 
> *if form.vars.delete_this_record:*
> description = 'ID %s deleted in table %s' % (form.vars.id, table)
> insert_table_event(time_stamp, client_ip, user_id, origin, description)
> else:
> description = 'ID %s updated in table %s' % (form.vars.id, table)
> insert_table_event(time_stamp, client_ip, user_id, origin, description)
>
> 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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to