-
Define Case in Switch statements
Instead of having my expression use the number of the layer in the pop up drop down how can I have it use the name of the item in the drop down. For example I don’t want the expression below to use the number but the actual text for the case. So the case would be Air Force, Akron, and Alabama for example.
var num = comp("test comp").layer("Null 2").effect("Home Team")
("Home Team").value;
switch(num) {
case Air Force:
theText = "Air Force";
break;
case 2:
theText = "Akron";
break;
case 3:
theText = "Alabama"
break;
default:
theText = "Team Name"
}
theText