row.update_record(effectiveSize=row.effectiveSize-1)
has better chances

On Saturday, March 23, 2013 9:25:02 AM UTC+1, Annet wrote:
>
> In defined a table with a field effectiveSize, after a user deleted a 
> record from the child table
> effectiveSize should be decreased by 1, does this work?
>
> def onsuccess_related_names(form):
>     row=db(db.groups.id
> ==session.groupID).select(db.groups.effectiveSize).first()
>     if row:
>         row.update_record(effectiveSize-=1)
>
>
> Kind regards,
>
> Annet
>

-- 

--- 
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/groups/opt_out.


Reply via email to