Avatar

Level 10

If you create a multiselct list then the rawValue will return a string separated by Carriage returns so all of your fi statements will never match. You can use javascript to split the string into individual values and put them into an array. Then test each individual string in the array through your if statements.

The code wouls look something like this:

//set a var to hold the selections

var temp =this.rawValue;

//split the selection based on the CR char
var tempArray = temp.split("\x0A");
//debug step to make sure we got all the selections

app.alert(tempArray.length);

//run through each selection
for (i=0;i<=tempArray.length;i++){
temp = tempArray[i];
//debug step to see that we have a single selection

app.alert(temp)

//Note that you must change your code to test the temp variable instead of the selection in the list
if (temp == "Aura")
  {flexsubform.aura.presence = "visible";}
else
  {flexsubform.aura.presence = "hidden";}

if (temp == "Defensive Abilities")
  {flexsubform.defensiveabilities.presence = "visible";}
.......