I have the following code below, unfortunately i can't get it to work.
On my form I have an option set called:
function filterLookupByOptionSet(executionContext) { var formContext = executionContext.getFormContext(); var caseTypeCode = formContext.getAttribute("casetypecode").getValue(); if (caseTypeCode != null) { var filter = "" "" ""; formContext.getControl("xpg_casesubtypeid").addCustomFilter(filter); } else { formContext.getAttribute("xpg_casesubtype").setValue(null); } }