Displaying 1 result from an estimated 1 matches for "fed_mileage_r".
2006 Jul 12
1
Question re: Computing a field in a DB record
...ecord based on the value of another form input
field. Using the scaffold code, the create works as expected and the
update (edit) also works. However, one of the DB fields (amount) is
supposed to be computer from another (units): if the category field
is "Mileage", amount= units * Fed_mileage_rate, otherwise amount= units.
To accomplish this, I removed the amount field from the input form,
as it is never entered directly, and put in an if statement to
accomplish the computation above. When I test this by doing a create
or an update, and units field is correct, but the amount is not...