Trying to create a set of department wide (or process related) templates to make sure that our docs are unified and we can use Alfresco features as much as possible.
Created a WORD file and uploaded into to ./repository/data dictionary/node templates. Then used the create document from a model option and selected the template.
The problem I have with this function is this: the document is created with the same file name and extension as the one of the template. When the user is modifying the template - updating some of the information, mostly codes - Alfresco creates a new version of the document. The modification is done via Alfresco and MS Office.
However when the user is changing the file name - as he/she should do, Alfresco is creating a new document and keeps the 1st file as well. The user shall go back to the folder, look for the file with the same name as the template and delete it.
Is there a way to change the file name when the file is created from the template? keeping only the formatting and content of the template file
What is the best way if we need to create hundreds of documents?
I don't really understand how your users are changing the file name that results in a new file. Renaming a file will change the name on the original and not create a new file at all. Only if users - for some reason - download the file, rename and then re-upload it will a second file be created.
Here is what/how I tried:
The only method - before your reply - I found is the following:
This worked so far on the test I did, but I will try now your idea as well.
The first approach you tried is absolutely the wrong one to use. You are explicitly creating a new document by using the "Save As" feature in MS Word. The second approach you described is the correct one to use - rename the file within the Alfresco UI.
The approach using a rule is just an automation / simplification for users, and requires that you have some kind of logic that defines what the new file name should be.
Thanks for the confirmation Axel, I will update the user guide as such, then we will see how can I create the file name by concatenating several document properties, that would be even better.
Just to add to the thread, what I have done once was to customize the "Create from template" action and force it to show the edit-metadata form just after the document got created, and by doing so, the users were able to just change the properties as they wanted.
Can you share what have you done with the Create from Template action to show the property form? I have a new idea to implement: we have a contract folder type. this folder has few custom attributes, two of those are dates, basically close out dates. The idea is the following: when the user creates the folder, he/she has to provide the values for these properties. then Alfresco sends an email to a predefined group of user with the email subject formated to store few of the custom properties. A rule + script at outlook checks the incoming mail and if the sender is Alfresco and the subject is formated a certain way, the rule creates a calendar (or task) item and deletes the mail. the outlook part is okay, made it work, however I have some issues at Alfresco.
My idea is to force the property at upload time and send the mail when the save/create button is hit.
Hope you got what I plan to do, not sure it is clear enough.
I guess your code might be able to help to fire the email.
Thanks alot for your help,
Ok, I can share the code with you, but not in the next few days, as I am too busy with other projects.
I will have to dig into the project's code to take that part.
For My idea is to force the property at upload time, you can use the uploader-plus addon GitHub - softwareloop/uploader-plus: An Alfresco uploader that prompts for metadata . It does exactly that.
And following, for and send the mail when the save/create button is hit. I don't think it is a good idea to attach that event into the UI. It would be better to work on the server level, using a folder rule or even behaviours to act when the save is executed.
I guess your code might be able to help to fire the email. Again, my code is not the ideal trigger for this case. Consider the last paragraph information.
I am aware of the Uploader Plus add-on, tested it...but, at config time I should specify the upload folder. In our case, the folders are created ad hoc in various sites as the project is advancing. I am not able to predefine the upload folder in advance. One of the option would be to use a default upload folder, then a rule to distribute the documents into the right folders based on their meta data, but I am not sure this would be acceptable for the users.