I am using your new version of SPJS-Lookup and am receiving an error on my edit forms of “The rule ‘Org Change’ tried to invoke the function: “orgChange”. Error: TypeError: Cannot read property ‘append’ of undefined. It works fine in the new form as it isn’t trying to append the previous value to the lookup list of values. Any thoughts?
Custom JS:
var lookupOne = {
“fieldToConvertToDropdown”:[“FieldInternalName”],
“optTextFieldInternalName”:”Title”,
“listName”:”ListName”,
“listBaseUrl”:”/Sites/SiteName”,
“sortFieldName”:”Title”,
“clearInvalidSelections”:false,
“filterObj”:{
“on”:true,
“folder”:””,
“CAML”:null,
“fin”:”Org”,
“isLookup”:false,
“operator”:”Eq”,
“filterVal”:””
},
“dropDownDefaultvalue”:””,
“addYouOwnValue”:{
“on”:false,
“linkText”:”Write your own value”
},
“addToExternalList”:{
“on”:false,
“customFunction”:null,
“linkText”:”Add new item”,
“saveNewItemText”:”Save new item”
},
“debug”:false
};
function orgChange(){
lookupOne.filterObj.filterVal = getFieldValue(“FieldInternalName2”);
spjs.lookup.init(lookupDecisionForum);
}