08-06-2020 03:26 AM
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
08-06-2020 04:43 AM
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.
08-07-2020 07:51 AM
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??
08-07-2020 11:43 PM
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 );
08-10-2020 03:09 AM
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.
08-11-2020 03:32 AM
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
08-13-2020 07:37 AM
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.
08-13-2020 12:52 PM
var date = new Date('2013-11-28T22:25:51Z')
console.log(date.getFullYear());
Explore our Alfresco products with the links below. Use labels to filter content by product module.