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

Question

Question

Parse entry name in WF

asked on July 16, 2014

Hi,

 

I have a number (100's) of documents that have been added to a folder but do not have any template assigned to them (by mistake).  Each file is named BoxNumber, File Number.

 

I'm trying to create a WF which will run in this folder and update all these files so that it will assign the correct template to each file and parse out from the Entry Name the Box Number and add it to the Box Number Field in the template and the File Number and assign it to the relevant template field template field.

 

Thanks,

Anthony

 

 

0 0

Answer

SELECTED ANSWER
replied on July 16, 2014

Thanks for this Chris - it's getting me closer :)

 

I'm just stuck on the Pattern expression to use to get the number at the beginning of the Entry name and the Number at the end of the Entry Name.

 

BoxNumber, FileNumber

 

The entry names are all in the same format and the two parts are separated by a comma, followed by a space and then the FileNumber [012149, F012345679] for example.

 

Anthony 

 

0 0
replied on July 16, 2014

Hi Anthony,

 

If the box number is always 6 digits and always at the beginning of the file name then that's an easy one. Just use \d\d\d\d\d\d and return the first match.

 

If the File Number always starts with a letter then again you could use this \S\d\d\d\d\d\d\d\d\d and return the first match.

 

This could be refined depending on if the amount of numbers or characters are always the same. But this a really basic expression that should fit the bill wink

 

A guide to regular expressions can be found in the help file.

 

http://www.laserfiche.com/support/webhelp/workflow/9.1/en-us/LFWorkflow.htm#Resources/Tokens%20and%20Regex/Regular Expressions.htm

 

Hope this helps! laugh

1 0
replied on July 16, 2014

Good to see you got it sorted! yes

0 0
replied on July 16, 2014

Thanks again! laugh

0 0

Replies

replied on July 16, 2014

Hi Anthony,

 

You will need to build a workflow that looks something like this.

 

 

1. Find all the entries in a certain folder. Filter for only documents.

2. For each entry assign the required template and pattern match out whatever you need from the file name. For example below would be 4 numbers in a row \d\d\d\d.

 

 

Hopefully this should point you in the right direction or at least get you started!  smiley

 

Hope this helps!

0 0
replied on July 16, 2014

I can use \d\d\d\d\d\d\ to get the first part of the Entry Name, it's getting the second bit i'm struggling with.

 

Anthony

0 0
replied on July 16, 2014

Sorry,

 

[F]\d\d\d\d\d\d\d\d

 

did the trick.  I was other thinking things.  Quite simple really.

 

Anthony

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

Sign in to reply to this post.