I am utilizing three boxes with mutiple variables. I have tried coding if expressions like the following.
var MIBRA = State == 22 and Travel_Zone == 0 and Assignment_Type == 0 var MIBLA = State == 22 and Travel_Zone == 1 and Assignment_Type == 0 var MIYA = State == 22 and Travel_Zone == 2 and Assignment_Type == 0 var MIGA = State == 22 and Travel_Zone == 3 and Assignment_Type == 0 var MIRA = State == 22 and Travel_Zone == 4 and Assignment_Type == 0 var MIBRR = State == 22 and Travel_Zone == 0 and Assignment_Type == 1 var MIBLR = State == 22 and Travel_Zone == 1 and Assignment_Type == 1 var MIYR = State == 22 and Travel_Zone == 2 and Assignment_Type == 1 var MIGR = State == 22 and Travel_Zone == 3 and Assignment_Type == 1 var MIRR = State == 22 and Travel_Zone == 4 and Assignment_Type == 1 var MIBRH = State == 22 and Travel_Zone == 0 and Assignment_Type == 2 var MIBLH = State == 22 and Travel_Zone == 1 and Assignment_Type == 2 var MIYH = State == 22 and Travel_Zone == 2 and Assignment_Type == 2 var MIGH = State == 22 and Travel_Zone == 3 and Assignment_Type == 2 var MIRH = State == 22 and Travel_Zone == 4 and Assignment_Type == 2 if ( MIBRA ) then 92 elseif ( MIBLA ) then 97 elseif ( MIYA ) then 99 elseif ( MIGA ) then 110 elseif ( MIRA ) then 120 elseif ( MIBRR ) then 115 elseif ( MIBLR ) then 125 elseif ( MIYR ) then 135 elseif ( MIGR ) then 150 elseif ( MIRR ) then 160 elseif ( MIBRH ) then 185 elseif ( MIBLH ) then 195 elseif ( MIYH ) then 205 elseif ( MIGH ) then 225 elseif ( MIRH ) then 235 else 0 endif
but when I run the form and the code is scripted for a numerical field, I only get the assignment_type == 0 values, but nothing else.
I have a drop down box of states, 1-50, travel zones, 1-5, and assignment types, 1-3. Any ideas?
Add some debugging statements to display the data that is being processed by the script. You could add the following line of script to the calculation:
xfa.host.messageBox(Concat("State: ", State, " Travel Zone: ", Travel_Zone, " Assignment Type: ", Assignment_Type) )
George Kaiser