Hi all,I have a dropdown combobox field called “DeliveryEmpList” that I want to be invisible if the current user does not have the “WarehouseMgt” userRole assigned to him or if the value of a radio button called “DeliveredBy” does not have the “Staff Member” item selected. The Hide-When attribute for the “DeliveryEmpList” field is:
!@IsMember(“[WarehouseMgt]” ; @UserRoles) & DeliveredBy != “Staff Member”
The onChange JS code for the “DeliveredBy” field is:
var f = document.forms[0];
if (f.DeliveredBy.options[f.DeliveredBy.selectedIndex].text == “Staff Member”) {
f.DeliveryEmpList.style.visibility = ‘visible’;
f.DeliveryEmpList.focus();
}
else {
f.DeliveryEmpList.style.visibility = ‘hidden’;
}
_doClick(‘$Refresh’,this,null);
I even tried to modify the code as follows and still doesn’t work:
var f = document.forms[0];
if (f.DeliveredBy.options[f.DeliveredBy.checked].text == “Staff Member”) {
f.DeliveryEmpList.style.visibility = ‘visible’;
f.DeliveryEmpList.focus();
}
else {
f.DeliveryEmpList.style.visibility = ‘hidden’;
}
_doClick(‘$Refresh’,this,null);
Any assistance would be greatly appreciated.
Thanks,
Dan