I am working on a process that should pattern match information found in a documents folder name and populate that information in a metadata field. Is there a tool that has this functionality?
Question
Question
Answer
You are on the right track, and your intuition that this workflow can be simplified is also correct.
For one, the Search Repository activity has an option to retrieve field information, so the Retrieve Field Values is redundant. Also, you have access to the path of the current entry (the For Each Entry activity creates tokens for the Name, Path, and Full Path) without needing to store it using Assign Token Values. And of course, once you have confirmed that this workflow behaves as intended, Track Tokens can be taken out as well.
Replies
Hi Jesse,
Workflow certainly has that capability, typically by using a regular expression within the token dialog or pattern matching activity. Can you provide some details about what you are trying to match and set as metadata?
Thanks for answering. However, I found a solution. I attached an image of the workflow I am working on. So, this workflow needs to crawl through every document in this repository and populate a case ID in a new case ID field from the containing folders name.
First, it searches the repo for documents, then for each document found it retrieves some existing metadata, next it assigns a token from the for each entry tool to get the full path of the document, using pattern matching [9-0]+ it retrieves the case ID from the full path token, lastly it assigns a new template and populates the pattern matched token and metadata retrieved earlier.
Is this the best way to do this? It seems like a lot of steps.
It looks like you have it figured out and are on the right path! Pretty much the way you need to crawl through all your docs and get things updated. You could possibly do without the pattern matching activity and perform that via a reg-exp in the token dialog when assigning fields but there is nothing wrong with the way you have it.
Six of one, half a dozen of the other ....
You are on the right track, and your intuition that this workflow can be simplified is also correct.
For one, the Search Repository activity has an option to retrieve field information, so the Retrieve Field Values is redundant. Also, you have access to the path of the current entry (the For Each Entry activity creates tokens for the Name, Path, and Full Path) without needing to store it using Assign Token Values. And of course, once you have confirmed that this workflow behaves as intended, Track Tokens can be taken out as well.