This is related to post https://answers.laserfiche.com/questions/78605/Route-to-Folder-. I have a workflow that route a document to the same directory. If the document with the same name exists, then it is ok to have the same name with appended "(2)" or "(3)" and or so on appended to the new document. When I run the workflow on one file at a time there is no problem with the naming and the number appended. I get EXISTING_DOC, and the second file that was routed is named EXISTING_DOC (2), and the third one is EXISTING_DOC (3). However, when there are more than one file for the workflow to route at the same time (my workflow has a for each entry activity), the number at the end of file names were not in consecutive order. Is there a way I can have the number in order? (eg. if there are 5 existing files in that directory then the new file with the same name will have (6) appended to the name)
Question
Question
Replies
We need a bit more information to figure out what is going on. It looks like either the document is moved multiple times, renaming every time, OR, there is a conflict on renaming and the server tries the next available number in the sequence until it succeeds. Without knowing more details, I would suggest having unique names for the documents. You could have workflow rename each document so workflow would be doing the work. We would need to take a look at the workflow instance details to see what happened.
Thanks Ashley. Mistake on my end. I started my workflow with find entries in "start folder" and for each entry perform series of activities including rename and routing. The start rule of this workflow is when there is a new file in "start folder". I suspect for each new file, the work flow is triggered and perform activities on all files in the folder, hence each file gets re-named and routed several times. When removed "for each" the issue went away. I believe my option is either use condition start rule with no "for each" or have schedule as start rule and keep the for each.