Hi i need help to get a value in the green circle here is what i will need it to do.
This is a oil Sample submit form and the fleet number is the number of a machine like a vin number for a car
and the smr km/hr entry is the mileage on the car
so what the calculated field must do is take the last smr km/hr that the "oil changed" was selected in previous submitions and minus that with the new smr hr/km thats entered for that component also marked in red
basically check fleet number and component where "oil changed" = "changed" and minus the old smr hr/km from the new one thats entered and insert it into "smr hr/km oil in use"
it needs to calculate how long the oil is in use from last time it was changed
Hope this males any sense added a picture of elements aswel
i think i should use the calculated field but i have no idea how to calculate this in php
thanks in advance