Hi All,
I want to create a Folder in Parent by reading Property from document inserted,created or uploaded in Parent and then move that document to that folder.
I am getting some idea that how it may work like i have to create rule on parent with criteria when item are created or enter this folder, then i have added my property in all criteria met. Now my question is my property is of type d:text and can have upto 6 characters and in the condition it has condition of begins with,equal to,contains, end with . so what should i provide in it.
Also like i have around 1000+ document to be created . so how to create script which will move this document to the folder created on the basis of each document.
Please anyone can guide me on this issue will be great help.
Thanks,
Piyush
You can use the 'Execute Script' option.
First, you need to write a script to perform the operations to be performed on the document.
Save the script in <name>.js format and upload it to Repository -> Data Dictionary -> Scripts
This script file will be listed when you select the 'Execute Script' option in 'Perform Action'.
Using such scripts you can perform any operation you want.
Hi,
I want create folder by reading year property from created date and if document increases by 1000 then to create folder on basis of month and move that document to that folder.
@abhinavmishra14 any views or idea you can provide me here??
Following is an example
// get parent folder of current documnet
var parent = document.parent;
var year = document.properties["**:name"];
//create
var yearFolder = parent.createFolder(uploadDirectory);
//move to destinition folder
document.move(yearFolder );
Hi @kaynezhang ,
i have datetime property as "giolicyEndDate":"2013-11-28T22:25:51Z", in that i want only year that is 2013 as my folder. Could you guide me please.
Thanks,
Piyush.
hi,
Can anyone suggest me how can i get year from this datetime property of "gi : policyEndDate": "2013-11-28T22:25:51Z".
I am not getting it how to get this year value from the above property and i need to deliver this task as soon as possible.
Please someone do guide me out.
Thanks,
Piyush
hi @kaynezhang , @kintu_barot ,
can anyone guide me on the above property issue. I am stuck on this and is not finding solution anywhere.
Thanks,
Piyush.
var date = new Date('2013-11-28T22:25:51Z')
console.log(date.getFullYear());
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.