// the fields current value currentValue = attributes.currentValues[fqFieldName]; // the param structure which will hold all of the fields from the props dialog xparams = parameters[fieldQuery.inputID]; // overwrite the field ID to be unique xParams.fieldID = #fqFieldName#; // Set the defaults if( StructKeyExists(xParams, "forceScripts") AND (xParams.forceScripts EQ "1") ) xParams.forceScripts = true; else xParams.forceScripts = false; // Filter Props if( NOT StructKeyExists(xParams, "defaultDeptID") OR (NOT LEN(xParams.defaultDeptID)) ) xParams.defaultDeptID = ""; if( NOT StructKeyExists(xParams, "renderDeptFilter") OR (NOT LEN(xParams.renderDeptFilter)) ) xParams.renderDeptFilter = "1"; if( NOT StructKeyExists(xParams, "defaultTermID") OR (NOT LEN(xParams.defaultTermID)) ) xParams.defaultTermID = ""; if( NOT StructKeyExists(xParams, "renderTermFilter") OR (NOT LEN(xParams.renderTermFilter)) ) xParams.renderTermFilter = "1"; if( NOT StructKeyExists(xParams, "loadAvailable") OR (NOT LEN(xParams.loadAvailable)) ) xParams.loadAvailable = "0"; // 0 = infinite selections are possible if( NOT StructKeyExists(xParams, "uiTheme") OR (NOT LEN(xParams.uiTheme)) ) xParams.uiTheme = ""; //-- App Override Variables --// if ( NOT StructKeyExists(xparams, "appBeanName") OR LEN(xparams.appBeanName) LTE 0 ) xparams.appBeanName = ""; if ( NOT StructKeyExists(xparams, "appPropsVarName") OR LEN(xparams.appPropsVarName) LTE 0 ) xparams.appPropsVarName = ""; // XPARAMS fields that cannot be overridden by the App xparamsExceptionsList = "fieldID,chooserCFCName,appBeanName,appPropsVarName"; // Optional ADF App Override for the Custom Field Type XPARAMS If ( LEN(TRIM(xparams.appBeanName)) AND LEN(TRIM(xparams.appPropsVarName)) ) { xparams = application.ADF.utils.appOverrideCSParams( csParams=xparams, appName=xparams.appBeanName, appParamsVarName=xparams.appPropsVarName, paramsExceptionList=xparamsExceptionsList ); } // find if we need to render the simple form field renderSimpleFormField = false; if ( (StructKeyExists(request, "simpleformexists")) AND (request.simpleformexists EQ 1) ) renderSimpleFormField = true; // Load the scripts application.ptCourseCatalog.scripts.loadJQuery(force=xParams.forceScripts); application.ptCourseCatalog.scripts.loadJQueryUI(themeName=xparams.uiTheme,force=xParams.forceScripts); application.ptCourseCatalog.scripts.loadADFLightbox(); application.ptCourseCatalog.scripts.loadCFJS(); // init Arg struct initArgs = StructNew(); initArgs.fieldName = fqFieldName; initArgs.filterAvalue = xParams.defaultDeptID; initArgs.renderFilterA = xParams.renderDeptFilter; initArgs.filterBvalue = xParams.defaultTermID; initArgs.renderFilterB = xParams.renderTermFilter; // Build the argument structure to pass into the Run Command selectionsArg = StructNew(); selectionsArg.item = currentValue; selectionsArg.queryType = "selected"; selectionsArg.csPageID = request.page.id; selectionsArg.fieldID = xParams.fieldID; selectionsArg.filterAvalue = xParams.defaultDeptID; selectionsArg.renderFilterA = xParams.renderDeptFilter; selectionsArg.filterBvalue = xParams.defaultTermID; selectionsArg.renderFilterB = xParams.renderTermFilter; if ( structKeyExists(request, "element") ) { labelText = ''; tdClass = 'CS_Form_Label_Baseline'; } else { labelText = ''; tdClass = 'cs_dlgLabel'; } #labelText#
#application.ptCourseCatalog.utils.runCommand(beanName=xParams.chooserCFCName, methodName="loadStyles", args=initArgs)#
#application.ptCourseCatalog.utils.runCommand(beanName=xParams.chooserCFCName, methodName="loadSearchBox", args=initArgs)#
#application.ptCourseCatalog.utils.runCommand(beanName=xParams.chooserCFCName, methodName="loadAddNewLink", args=initArgs)#
Select the records you want to include in the selections by dragging items into or out of the 'Available Items' list. Order the columns within the datasheet by dragging items within the 'Selected Items' field.
Available Items
Selected Items
    // Set the query type flag before running the command selectionsArg.queryType = "notselected"; #application.ptCourseCatalog.utils.runCommand(beanName=xParams.chooserCFCName, methodName="getSelections", args=selectionsArg)#
    // Set the query type flag before running the command selectionsArg.queryType = "selected"; #application.ptCourseCatalog.utils.runCommand(beanName=xParams.chooserCFCName, methodName="getSelections", args=selectionsArg)#