I have created a subform with repeating rows and I'm trying to have a calculated field keep track of the cumulative mileage.
The structure is
form1
sectionB
header
detail
button1
date_from
date_to
mileage
delete
total
total
In total I have amended the script from the Purchase Order template but I must be doing something wrong as it isn't working. I have applied the script below to the calculate event on the total field.
//Verify at least one instance of the mileage field exists. if (exists(details[0].mileage) == 1) then Sum(detail[*].mileage) endif
Any ideas?
if (Exists(details[0].mileage) == 1) then
Sum(detail[*].mileage)
endif
FormCalc and JavaScript is case sensative for keywors, variables, functions, properites, methods, etc.
George Kaiser