I was hoping to get assistance here, i have a database table called* 
(logging)* that has 3 fields, *(startingDistanceValue, endingDistanceValue 
and distanceTravelled)*, distanceTravelled is the difference between 
endingDistanceValue and startingDistanceValue, when I start my trip i enter 
startingDistanceValue & subit my form, when i arrive i update & edit my 
form by entering endingDistanceValue, what i want is that by entering 
endingDistanceValue then the distanceTravelled is calculated automatically 
and acquires its value automatically then i submit my form for saving. How 
can i achieve this in web2py?

*Model:*
db.define_table('logging',
                Field('startingDistanceValue','integer', requires=
IS_NOT_EMPTY()),
                Field('endingDistanceValue','integer', requires=IS_NOT_EMPTY
()),
                Field('distanceTravelled'))

Regards:

Mostwanted

-- 
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