I am trying to set a variable conditionally using a if/then statement but cant seem to get it to work using formcalc
here are a few examples of what I have tried
--------------------------------------
if (textField1.rawValue == null) then
var myVar = "?"
else
var myVar = textField1.rawValue
endif
--------------------------------------
if (textField1.rawValue.isNull) then
var myVar = "?"
else
var myVar = textField1.rawValue
endif
I also tried declaring the variable befor running the if statement using
var myVar
I can seem to get it to set the variable based on wether the text field is empty... It has to be something stupid and simple I am missing.
var myVar
if (textField1.rawValue == null) then
myVar = "?"
else
myVar = textField1.rawvalue
endif