Hi,
Please note that the “includes” method doesn’t work in IE.
I suggest you do it like this:
var fArr = getFieldValue("MultiChoiceField1");
if(jQuery.inArray("Value2",fArr) > -1){
setFieldValue("MulitChoiceField2","Value2");
}else{
setFieldValue("MulitChoiceField2","Value1");
}
Please note that the setFieldValue will clear existing selection before the new value is set. If this is not what you want you’ll have to pull the array from “MulitChoiceField2” and push the new value in before setting the complete array of values.
Hope this makes sense,
Alexander