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

Question

Question

Find Entry/Pattern Matching?

asked on February 20, 2020

Hello All,

 

I am currently trying to build a workflow that will only match with existing ID numbers or create a new folder if there is no match. I am having the issue where multiple folders are being created when the name fields do not match. My users want the pattern matching to just look at the ID number and not the name. But they want the name included in the title of the folders created. I have it set up to match on ID number and it is working but if a middle name or initial is used and the existing folder doesn't have this than a new folder is created.

 

My workflow looks like this:

Pattern Matching

Retrieving the ID number from the Template, with Return set as First match only and Pattern .{8} (Our ID numbers are unique and are 8 digits) Regular expression .{8}

Find Entry

Looking within the folder the documents with be routed to. With Pattern Matching ID number with regular expression .{8}

Move Entry

Destination: Set to the folder we want the document routed to. 

If the path does not exist: Create it

Destination Path: Classifications\ Inmate Files\ID Number NAME\ Doc Type

If I take the name out of the destination path the workflow works how we want it. But our users want the name next to the ID number so it's easy to find folders. 

I know I have to be missing something. Any help on this would be helpful. 

Pattern Matching.PNG
Find Entry.PNG
Move Entry.PNG
LF.PNG
Find Entry.PNG (21.88 KB)
Move Entry.PNG (22.95 KB)
LF.PNG (1.58 KB)
0 0

Replies

replied on February 20, 2020 Show version history

Hi Kody

In your Pattern Match, it would be best to be a bit more specific in your pattern, as the one you are using will find any group of 8 characters regardless of them being numbers or letters. ie: \d{8} would only look at digits and grab an 8 digit number.

Where are you getting the Name variable from?

0 0
replied on February 20, 2020

The template has a name field, so depending on the user they will add a middle name or initial which causes variable name results. 

0 0
replied on February 20, 2020

From what I understand, since you can not control the name except for the 8 digits, you will need to instead change it to a Search as Find Entry is not dynamic enough for this case.

 

As Steve said, it sounds like you need to pattern match \d{8} then do a search activity off that. If you do an advanced search for a folder name with wildcards within a specific folder I think it will get you what you want.

0 0
replied on February 20, 2020

Find Entry is looking for a specific Entry ID, or a object within a specific location which wouldn't be part of the Template Name.

0 0
replied on February 20, 2020

Steve, so I created a Search Repository looking at the pattern matching (updated to \d{8}) for the folder I am using. I used a syntax advanced search from the Client. 

Do I use any from the Search Repository in the move entry?

0 0
replied on February 21, 2020

Hi Kody

If you find a Folder with the same Number from the Pattern Match, Is the intent to change the name of that Folder with ID Number and Name, and only create the new folder if the other was not found?

0 0
replied on February 21, 2020

The intent is to add a document into the folder even if the names don't match, or create a new folder if one was not found. 

0 0
replied on February 21, 2020

Ok, you are going a more indepth workflow and some conditions.

How much of this workflow do you have built now?

Is there a way you can share, as this is more than a one step solution

0 0
replied on February 21, 2020

Steve, I have the full workflow built:

Retrieve Fields

Pattern Matching

Search Repository

Move Entry

 

 

Workflow.PNG
Workflow.PNG (8.32 KB)
0 0
replied on February 21, 2020

 

 

What I'm doing here is to look for the folder based on the JID. In the Search I'm looking for the JID plus a wildcard, ie: 12345678* in case the Folder characters in the folder name has any additional characters. I'm also assuming the 8 digit number appears at the beginning of the name.

After I search for the folder, the condition checks if a folder was found, if so, it moves the file into the found folder, if not, the Not found condition would create a new folder which can include the Name in the Folder name ie: 12345678 Smith.

Which kind of sounds like what you were looking for. If that is true, then if I found an existing Folder, I would want to update the Folder name to be the same format.

If you follow this below, I think you can at least see the logic. Not always possible to interpret this correctly through these not in person formats.

As far as the Rename Entry, I wasn't sure if you were attempting to rename the original file, but if so, you can use it the way I have it set up.

Best of Luck

 

 

0 0
replied on February 21, 2020

Thank you Steve, this makes sense and it what I am looking for. But I am still not able to find the existing folder. Here is the test workflow I just built following your guide. 

Test Workflow.PNG
0 0
replied on February 21, 2020 Show version history

I would suggest you add the Track Tokens activity into your workflow so you see what values your tokens contain as a means of troubleshooting. Provide a screen capture of you folder structure would be helpful

0 0
replied on February 25, 2020

In the search for the Folder Name, you may need to put %(PatternMatching_JID*) incase the folder has any other characters in the name other than the JID number.

Run the Search from the Repository directly to test the results, and test here as well to ensure you get the same results

0 0
replied on February 26, 2020

I changed Name to Basic~ and F to LTF per the search syntax it give me. It is now finding an existing JID.  

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

Sign in to reply to this post.