08-16-2010 05:47 PM
//Alfresco auto-tagger
//compliments of Zach Bennett, Eagle Productivity Solutions
//two lines of code
//free for anyone to use
//no license, no strings attached
//get tags from parent (folder) node
var tagArray = document.parent.getTags();
//add the tags to the document node
document.addTags(tagArray);11-16-2013 03:48 AM
12-04-2013 04:09 AM
var docuname = document.name;
var docuname_lower = docuname.toLowerCase();
var tagArray = [];
var taggable_array = ["PATH:\"/cm:categoryRoot/cm:taggable/*\""];
for each(var tag in taggable_array){
var nodes = search.luceneSearch(tag);
for each(var node in nodes) {
var x = node.name.toLowerCase();
var y = docuname_lower.indexOf(x);
if (y >= 0) {
tagArray.push(node.name);
}
}
}
document.addTags(tagArray);
document.save();
var docuname = document.name;
var docuname_lower = docuname.toLowerCase();
var catArray = [];
var category_array = ["PATH:\"cm:generalclassifiable/cm:DocumentType/*\"","PATH:\"cm:generalclassifiable/cm:Product/*\"","PATH:\"cm:generalclassifiable/cm:Technology/*\""];
for each(var cat in category_array){
var nodes = search.luceneSearch(cat);
for each(var node in nodes) {
var x = node.name.toLowerCase();
var y = docuname_lower.indexOf(x);
if (y >= 0) {
catArray.push(node);
}
}
}
document.addAspect("cm:generalclassifiable");
document.properties["cm:categories"] = catArray;
document.save();
01-04-2015 12:43 PM
02-23-2015 02:28 AM
04-07-2016 10:33 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.