As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
var docyear = "Year " + document.properties["co1:year"]; var destNode1 = document.parent; var destNode2 = space.childByNamePath(docyear); var SourceNode = companyhome.childByNamePath("Data Dictionary/Space Templates/hr-year"); // container with pre-designed folder structure if (destNode2 === null || destNode2.length === 0) { //creates folder and moves document var newNode = SourceNode.copy(destNode1, true); newNode.name = docyear; document.move(newNode); document.save(); } else { //moves document to already present container document.move(destNode2); document.save(); } }