I have a form that captures the costs to install a pipe by boring it, vs. more expensive options. So, it basically looks like this:
Crew Time:
____________
Equipment Time:
____________
Bore Cost:
(${crew_time}*125)+(${equipment_time}*50)
Alternate Install Method:
____________
Alt Method Cost:
if(selected(${alt_method},'Plow'),((${crew_time}*125)+(${equipment_time}*50)*2),if(selected(${alt_method},'Trench),((${crew_time}*125)+(${equipment_time}*50)*5),0))
Cost Savings:
${alt_method_cost}-${bore_cost}
I'm having an issue with the cost savings calculation. I'm guessing the cost savings calculation is being performed as soon as the Bore Cost field is getting calculated and populated, because the value always seems to come back as negative whatever the bore cost is. It doesn't appear to be picking up the alt method cost.
I've even tried adding another question after the alt method cost that the cost savings calculation would be dependent on before it executed the calculation - something like "if work_complete is yes, perform the calculation, if work_complete is no, perform the calculation; otherwise enter 0 as the value". This keeps a value of 0 in the cost savings field until I check yes or no for the new question, but even then, it's not performing the calculation, it's just entering a negative bore cost value...it still doesn't appear to see the value of the alt method cost.
Any ideas/solutions?