You are viewing limited content. For full access, please sign in.

Question

Question

How to Replace Employee Name in Document Name?

asked on June 20, 2014

We are creating a workflow for when an employee changes their name. We will extract the employees old name from the current employee's folder and rename it. That part we have working thanks to the community. Now we need to figure out how to replace the employee's name when it is in a document name. A document name is in the format of "Date - Document Type - Last Name, First Name". I need to keep the rest of the document name and only replace the employee's old name (saved in a token) with the new name that is in a token.

 

I'm not sure how to go about replacing the name using the activities in a workflow. Any ideas would be appreciated.

0 0

Answer

SELECTED ANSWER
replied on June 20, 2014 Show version history

You should be able to use the entry name token to pull everything except the old name out of the entry name and then add your new name token to that for a new entry name.  Something like this I would think should work

%(Entry Name#<(.*-\s+.*-\s+).*>#)%(PersonsNewName)

As long as the persons new name token is in the form of Last, First

 

I would use this in a rename entry activity or a create token activity.

0 0
replied on June 23, 2014

Bert, Thank you for the response. I used the tokens that you specified and modified the %(PersonsNewName) token to what is actually being used for their new name tokens. It renames the document, but only places the new name in and does not contain any information about the rest of the document name. Any other ideas?

0 0
replied on June 23, 2014

I figured it out. I used a Pattern Matching activity using .*-\s+.*-\s+ to create a token called Old Document Name. Then using a rename activity put that token at the beginning and added the new name. Works great! Thanks!

0 0

Replies

replied on June 23, 2014

I thought I had it working ,but it is now naming all of the documents the same. Below are the details of the workflow for the renaming part.

 

0 0
replied on June 23, 2014

0 0
replied on June 23, 2014

That did it! Thank you!

0 0
replied on June 8, 2022

Better solution with Replace/Substitute function in Token Calculator activity

https://answers.laserfiche.com/questions/192440/Problem-with-pattern-matching#192544

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.