Hi All,
I've got 3 option set controls in my form as follows:
- new_value1type
- new_value2type
- new_value3type
All three of them contain the same values - "A", "B", "C".
I'm trying to eliminate the selected value of the 1st option set (aka new_value1type) from the 2nd and 3rd options sets.
Basically, If new_value1type == "A" then the user can't select "A" again in the other options sets.
I'm trying to do it with plain js but It's not working.
function dynamicOptionSet() { // Get value set by user if (Xrm.Page.getAttribute("new_value1type").getSelectedOption() != null){ var val_value1type = Xrm.Page.getAttribute("new_value1type").getSelectedOption().value; } else { var val_value1type = null; } // Filter next optionSet controls if (val_value1type == 100,000,000){ Xrm.Page.getControl("new_value2type").removeOption(100,000,000); Xrm.Page.getControl("new_value3type").removeOption(100,000,000); } else if (val_value1type == 100,000,001){ Xrm.Page.getControl("new_value2type").removeOption(100,000,001); Xrm.Page.getControl("new_value3type").removeOption(100,000,001); } else if (val_value1type == 100,000,002){ Xrm.Page.getControl("new_value2type").removeOption(100,000,002); Xrm.Page.getControl("new_value3type").removeOption(100,000,002); } }
I'd rather NOT hard code the values but I'm not getting anywhere.
Thanks,