Avatar

Level 4

Hi

Im trying to have my switch selections do a couple of things from one selection and am getting stuck on the correct syntax to use

below is a code example of what i'm trying to do - but basically i need a selection case "2" say, to (1) set various fields values from variables (2) set the focus event to a field (that relates to the choice)

here's an example of my (broken) code (orange below) - does anyone know the correct syntax for doing this? The field i want to force the focus/view to go to in a couple pages down (if that makes a difference)....

thanks

switch (this.rawValue) {

     case "8":

{cHist.presence = "visible";}

          break;

case "1":{

(page3.para1.rawValue = a1.value)

(page3.para2.rawValue = b1.value)

(page3.target.presence = "visible")

(xfa.host.setFocus(page3.target)

}

// the idea being to make the field visible then take the users focus to it once the variables have been set - i hope switch can do multiples and it's just my syntax (again) -- thanks for the help

         break;

case "2": {

(page3.para1.rawValue = a1.value)

(page3.para2.rawValue = b2a.value + ", which occured in " + page5.oneEBA.rawValue + ")." + b2b.value)

}