Hi,
Is it possible to create smart folder's subfolders dynamically? All examples that I am finding only have fixed virtual folder structure.
I need to create smart folder where all contents are grouped to same virtual folder with same property value. For example the property could be emails sender property (cm:emailed:sender). The smart folder would contain subfolders of all possible email sender properties in contents, and within the content with that sender.
Is this possible, or does it require some more advanced add-on development?
Thanks
you can create a web script and apply a rule for the root folder to run that script. I also did something like that.
Sample web script file
// create a new folder in the same space
var whatEvent = document.properties["ia:whatEvent"];
var toDate = document.properties["ia:toDate"];
var fromDate = document.properties["ia:fromDate"];
var dd = toDate.getDate();
var mm = toDate.getMonth()+1; //January is 0!
var yyyy = toDate.getFullYear();
if(dd<10){
dd='0'+dd;
}
if(mm<10){
mm='0'+mm;
}
var today = dd + "-" + mm + "-" + yyyy;
var dd = fromDate.getDate();
var mm = fromDate.getMonth()+1; //January is 0!
var yyyy = fromDate.getFullYear();
if(dd<10){
dd='0'+dd;
}
if(mm<10){
mm='0'+mm;
}
var today1 = dd + "-" + mm + "-" + yyyy;
var folderNode = space.createFolder(whatEvent);
folderNode.properties['cm:title'] = today;
folderNode.properties['cm:description'] = "Due Date for Submission: " + today1;
folderNode.save();
// move the folder node to companyhome
var objDestFolder = companyhome.childByNamePath("Shared/Secretary to the Commission/COMMISSION_MEETINGS");
folderNode.move(objDestFolder);
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.