Ok. Still frustrated. I made the adjustments you suggested, and it's still not calculating the values. Here is the link to the file. It's in a DropBox folder: https://1drv.ms/b/s!AlZCRMmM6fhpgWU0rgRw80vquQ_8
My code is in the first line, and the other lines just have the simple code. Your suggestions are very much appreciated. I think JavaScript hates me.
OK, you have several issues with both the code and the set-up of the fields.
First of all, you were still using incorrect variable names.
Also, when the check-boxes are not ticked the value they have is "Off", which can't be converted to a number, so it results in an error.
So use this code:
var oSat1 = (this.getField("Sat1").valueAsString=="Off") ? 0 : Number(this.getField("Sat1").valueAsString);
var oSun1 = (this.getField("Sun1").valueAsString=="Off") ? 0 : Number(this.getField("Sun1").valueAsString);
var oSaF1 = (this.getField("SaF1").valueAsString=="Off") ? 0 : Number(this.getField("SaF1").valueAsString);
var oSuF1 = (this.getField("SuF1").valueAsString=="Off") ? 0 : Number(this.getField("SuF1").valueAsString);
if (oSat1 && oSun1) event.value = (oSat1 + oSun1 + oSaF1 + oSuF1 - 1);
else if (oSat1 || oSun1) event.value = (oSat1 + oSun1 + oSaF1 + oSuF1);
else event.value = 0;
In addition, you have to remove the "$" symbol from the export values of all the check-boxes. For example, the value of "Sat1" was "$7.00". That also can't be converted to a number, so change it to just "7".