Hi All,
I have been stumped on this FormCalc code for a few days now. If anyone can give me a hand to get this back on track, that would be great. It's the only thing holding up the completion of this snow removal datasheet.
Here is the code:
if (SiteCode1 == "W400") then (if (Accum1 < 1) then (0) elseif (Accum1
<= 3) then (1300) elseif (Accum1 <= 6) then (2000) elseif (Accum1 <=
9) then (2700) elseif (Accum1 <= 12) then (3400) elseif (Accum1 <= 15)
then (4100) endif) endif
The error is as follows:
"Script Failed (language is formcalc; context is
xfa[0].form[0].#subform[0].Table1[0].Row1[4].PerPush1[0])
script=if (SiteCode1 == "W400") then (if (Accum1 < 1) then (0) elseif
(Accum1 <= 3) then (1300) elseif (Accum1 <= 6) then (2000) elseif
(Accum1 <= 9) then (2700) elseif (Accum1 <= 12) then (3400) elseif
(Accum1 <= 15) then (4100) endif) endif
Error: syntax error near token 'then' on line 1, column 51.
Something I have noticed, if I take away the first <i> "If (SiteCode1
=="W400") then (" </i> and lose the last<i> ") endif ," </i> the
formula works fine. however, that would mean that I need to dedicated
a form per project location.
Any help would be greatly appreciated, I have spent hours on this
trying to get it figured out, and no matter the values and binding
things I change, I cant seem to get this working.
Thanks in advance!
Nick