// Variable for the version of the field - Display in Props UI. fieldVersion = "1.0.4"; // CS version and required Version variables requiredCSversion = 9; csVersion = ListFirst(ListLast(request.cp.productversion," "),".");
This Custom Field Type requires CommonSpot #requiredCSversion# or above.
// initialize some of the attributes variables typeid = attributes.typeid; prefix = attributes.prefix; formname = attributes.formname; formID = attributes.formID; currentValues = attributes.currentValues; // AjaxProxy Path to make ajax call in context of the site ajaxComURL = application.ADF.ajaxProxy; ajaxBeanName = 'customElementDataManager'; if( not structKeyExists(currentValues, "childCustomElement") ) currentValues.childCustomElement = ""; if( not structKeyExists(currentValues, "parentUniqueField") ) currentValues.parentUniqueField = ""; if( not structKeyExists(currentValues, "childUniqueField") ) currentValues.childUniqueField = ""; if( not structKeyExists(currentValues, "childLinkedField") ) currentValues.childLinkedField = ""; if( not structKeyExists(currentValues, "inactiveField") ) currentValues.inactiveField = ""; if( not structKeyExists(currentValues, "inactiveFieldValue") ) currentValues.inactiveFieldValue = ""; if( not structKeyExists(currentValues, "displayFields") ) currentValues.displayFields = ""; if( not structKeyExists(currentValues, "widthValue") ) currentValues.widthValue = ""; if( not structKeyExists(currentValues, "widthUnit") ) currentValues.widthUnit = ""; if( not structKeyExists(currentValues, "heightValue") ) currentValues.heightValue = ""; if( not structKeyExists(currentValues, "heightUnit") ) currentValues.heightUnit = ""; if( not structKeyExists(currentValues, "sortByType") ) currentValues.sortByType = ""; if( not structKeyExists(currentValues, "sortByField") ) currentValues.sortByField = ""; if( not structKeyExists(currentValues, "sortByDir") ) currentValues.sortByDir = ""; if( not structKeyExists(currentValues, "positionField") ) currentValues.positionField = ""; if( not structKeyExists(currentValues, "refersParent") ) currentValues.refersParent = 1; if( not structKeyExists(currentValues, "assocCustomElement") ) currentValues.assocCustomElement = ""; if( not structKeyExists(currentValues, "interfaceOptions") ) currentValues.interfaceOptions = "new,editChild,delete"; if( not structKeyExists(currentValues, "compOverride") ) currentValues.compOverride = ""; if( not structKeyExists(currentValues, "parentInstanceIDField") ) currentValues.parentInstanceIDField = ""; if( not structKeyExists(currentValues, "childInstanceIDField") ) currentValues.childInstanceIDField = ""; customElementObj = Server.CommonSpot.ObjectFactory.getObject('CustomElement'); allCustomElements = customElementObj.getList(type="All", state="Active"); parentCustomElementDetails = customElementObj.getInfo(elementID=formID); selectedTypeFields = customElementObj.getFields(elementID=formID); errorMsgCustom = 'Some error occurred while trying to perform the operation.'; SELECT * FROM allCustomElements WHERE lower(Type) = SELECT ID, Label AS Name FROM selectedTypeFields WHERE application.ADF.scripts.loadJQuery(noConflict=true); application.ADF.scripts.loadJQueryUI(); style="display:none;"> style="display:none;"> style="display:none;"> style="display:none;"> style="display:none;"> style="display:none;">
Child Custom Element:
  #Server.CommonSpot.udf.tag.checkboxRadio(type="checkbox", name="#prefix#refersParentCheckbox", value="1", label="The child element contains the reference to the parent instance", checked=(currentValues.refersParent EQ 1), labelClass="cs_dlgLabelSmall", onchange="#prefix#toggleAssocFld()")# #Server.CommonSpot.udf.tag.input(type="hidden", id="#prefix#refersParent", name="#prefix#refersParent", value="#currentValues.refersParent#")#
 
Association Custom Element:
Interface Options: style="display:none;">#Server.CommonSpot.udf.tag.checkboxRadio(type="checkbox", id="#prefix#interfaceOptionsCbox", name="#prefix#interfaceOptionsCbox", value="new", label="Allow 'Add New'", labelIsHTML=1, checked=(ListFindNoCase(currentValues.interfaceOptions,'new')), labelClass="cs_dlgLabelSmall")#
style="display:none;">#Server.CommonSpot.udf.tag.checkboxRadio(type="checkbox", id="#prefix#interfaceOptionsCbox", name="#prefix#interfaceOptionsCbox", value="existing", label="Allow 'Add Existing'", labelIsHTML=1, checked=(ListFindNoCase(currentValues.interfaceOptions,'existing')), labelClass="cs_dlgLabelSmall")#
style="display:none;">#Server.CommonSpot.udf.tag.checkboxRadio(type="checkbox", id="#prefix#interfaceOptionsCbox", name="#prefix#interfaceOptionsCbox", value="editAssoc", label="Allow 'Edit'", labelIsHTML=1, checked=(ListFindNoCase(currentValues.interfaceOptions,'editAssoc')), labelClass="cs_dlgLabelSmall")#
style="display:none;">#Server.CommonSpot.udf.tag.checkboxRadio(type="checkbox", id="#prefix#interfaceOptionsCbox", name="#prefix#interfaceOptionsCbox", value="editChild", label="Allow 'Edit'", labelIsHTML=1, checked=(ListFindNoCase(currentValues.interfaceOptions,'editChild')), labelClass="cs_dlgLabelSmall")#
#Server.CommonSpot.udf.tag.checkboxRadio(type="checkbox", id="#prefix#interfaceOptionsCbox", name="#prefix#interfaceOptionsCbox", value="delete", label="Allow 'Delete'", labelIsHTML=1, checked=(ListFindNoCase(currentValues.interfaceOptions,'delete')), labelClass="cs_dlgLabelSmall")#
Display Fields:
Available Fields:
Fields to Display:
Grid Dimensions:
Width: #Server.CommonSpot.udf.tag.input(type="text", id="#prefix#widthValue", name="#prefix#widthValue", value="#currentValues.widthValue#", size="5", class="InputControl")# Height: #Server.CommonSpot.udf.tag.input(type="text", id="#prefix#heightValue", name="#prefix#heightValue", value="#currentValues.heightValue#", size="5", class="InputControl")#
Display Order:
#Server.CommonSpot.udf.tag.checkboxRadio(type="radio", name="#prefix#sortByType", value="auto", label="Sort By", checked=(currentValues.sortByType EQ '' OR currentValues.sortByType EQ 'auto'), labelClass="cs_dlgLabelSmall", onchange="#prefix#selectRadio(0)")#   
#Server.CommonSpot.udf.tag.checkboxRadio(type="radio", name="#prefix#sortByType", value="manual", label="Order Manually", checked=(currentValues.sortByType EQ 'manual'), labelClass="cs_dlgLabelSmall", onchange="#prefix#selectRadio(1)")# 
style="display:none;margin-left:40px;"style="margin-left:40px;" class="cs_dlgLabelSmall">Position Field: 
Only 'Number (integer)' or 'Hidden' fields can be used to Order Manually.
Component Override: #Server.CommonSpot.udf.tag.input(type="text", id="#prefix#compOverride", name="#prefix#compOverride", value="#currentValues.compOverride#", size="30", class="InputControl")#
#parentCustomElementDetails.Name#

Unique Field:
#selectedCEName#

Unique Field:
Linkage Field:
#selectedAssocCEName#

Please choose what fields store the following data in the association custom element
#parentCustomElementDetails.Name# InstanceID Field:
#selectedCEName# InstanceID Field:
Inactive Field:   style="display:none;">Inactive Value: #Server.CommonSpot.udf.tag.input(type="text", id="#prefix#inactiveFieldValue", name="#prefix#inactiveFieldValue", value="#currentValues.inactiveFieldValue#", size="10", class="InputControl")#

ADF Custom Field v#fieldVersion#
#Server.CommonSpot.UDF.tag.input(type="hidden", name="#prefix#displayFields", value=currentValues.displayFields)# #Server.CommonSpot.UDF.tag.input(type="hidden", name="#prefix#childCustomElement", value=currentValues.childCustomElement)# #Server.CommonSpot.UDF.tag.input(type="hidden", name="#prefix#interfaceOptions", value=currentValues.interfaceOptions)#