I've created a form with a drop down menu, amongst other numeric fields.
The last field is my total...but I'm having issues getting the calculation to work correctly.
In the drop down i have 5 choices listed. Under binding on that drop down, I've given each item it's own value. so the first option is 1, next is 2, etc.
So in my calculation, i wanted to run an if statement. If option 1 from the drop down is chosen, then multiply x * .5. if option 2 is chosen, then multiply x * .75, etc.
This is what I have so far:
if (HasValue(buildingtype1)) then
$.rawValue = Concat(250*.50)
else
if (HasValue(buildingtype2)) then
$.rawValue = Concat(250*lots*.50)
else
if (HasValue(buildingtype3)) then
$.rawValue = Concat(500)
else
if (HasValue(buildingtype4)) then
$.rawValue = Concat(1000)
else
if (HasValue(buildingtype1)) then
$.rawValue = Concat(20000)
else
$.rawValue = ""
endif
Of course I get an error when i switch from design view to PDF view to test it....
I'm also wanting to add other things in that total field, not just this drop down box.
any suggestions?
The "HasValue()" returns true when a selection has been made. "eq" or "==" is the equal operator. The "Concat()" function creates a character string from one or more values.
George Kaiser