This an IF statement I have included on my form, the first portion works. When I select the checkbox "SecStudentDisc" it will subtract 200 fron the TotalTuition, but when I select another check box the action does not happen.
What have I done wrong?
if (SecStudentDisc >=1) then
TotalTuition -200
else (ThirdStudentDisc >=1) then
TotalTuition -800
else (FourthStudentDisc >=1) then
TotalTuition -1800
else
TotalTuition
endif
if (SecStudentDisc >= 1 & ThirdStudentDisc => 1 & FourthStudentDisc >= 1) then
totalTuition - 1800
endif
if (SecStudentDisc >= 1 & ThirdStudentDisc => 1) then
totalTuition - 800
endif
if (SecStudentDisc >= 1) then
totalTuition - 200
endif
or
var test = 0
// build a binary value for testing
if (SecStudentDisc >=1) then
test +=1
endif
if (ThirdStudentDisc >=1) then
test +=2
endif
if (ForthStudentDisc >=1) then
test +=4
endif
switch(test) {
case 7:
totalTuition - 1800
case 3:
totalTuition - 800
case 1:
totalTuition - 200
break;
}
George Kaiser