Switch Drop Down text fields javascript question
I have a text field named 'EmpStatus1' and would like to switch the fields in drop downs named Exception1 and Exceptions2 . How I'm doing it below I can only get the first drop down to switch (Exception1). What can I do to get Exception2 to switch as well? Thank you so much!
//Validate in EmpStatus1 text field
setDropdowns(this.getField("Exception1","Exception2"));
//JavaScript Documentation named Switch Fields
function setDropdowns(field){
switch (event.value) {
case "Regular":
field.setItems([" ","CDO","CDO Leave","CDO Banked (worked on CDO)","Stat Holiday","Stat Leave","Vacation","Sick","Sick No Pay","Family Sick","Leave No Pay","COT","POT","Compassion Leave","WCB Hours","Paid OT1.5","Paid OT2.0","Bank OT2.0","Bank OT1.5","Meal Break","Callout Paid2.0","Callout Bank2.0","Cashier","Farm Attendant","Section Manager"]);
break;
case "Temp":
field.setItems([" ","CDO","CDO Leave","CDO Banked (worked on CDO)","Stat Holiday","Stat Leave","Vacation","Sick","Sick No Pay","Family Sick","Leave No Pay","COT","POT","Compassion Leave","WCB Hours","Paid OT1.5","Paid OT2.0","Bank OT2.0","Bank OT1.5","Meal Break","Callout Paid2.0","Callout Bank2.0","Cashier","Farm Attendant","Section Manager"]);
break;
case "Auxilliary":
field.setItems([" ","Stat Leave","Sick","Sick No Pay","Leave No Pay","WCB Hours","Paid OT1.5","Paid OT2.0","Meal Break","Callout Paid2.0","Cashier (Aux)","Farm Attendant (Aux)"]);
break;
default:
field.clearItems();}
}
