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

Question

Question

Route Entry to Folder Path in workflow

asked on October 12, 2020

Okay, I hate to admit how long I have been struggling with this!!  It seems soooooo simple but we are talking YEARS people.  

I am trying to format a "route entry to folder" path.  We have an existing folder structure.  It begins with Personnel\File Room\Active\   THEN there are folders for the alphabet, then folders for each employee (full name plus some numbers that will need to be "ignored"), then folders for each doc type.  So, for me if I submitted this particular form it would file to Personnel\File Room\Active\R\Rogers, Cindy ####\Monthly Timesheet   -  Okay, now, MOST of these folders are already there for me with the possible exception of Montly Timesheet BUT not always so I have to set it to create if not there.  As things are going now the doc files but it isn't filing correctly. I have messed with the path so often I can't really keep track any more.  Mostly it will go to the Personnel\File Room\Active and then create a whole new folder that just says "Rogers", then another folder that says "Cindy", then another folder that says "Monthly Timesheet".  Arghh.....  As I have said, I have messed with this so much but this is the path I am looking at right now: 

\PERSONNEL\FILE ROOM\Active\%(Fields.Last#<.>#)\%(Fields.Last)\%(Fields.First)\%(RetrieveFieldValuesforTimesheet_Document Type - PERS)

Can anyone help with this????  Thanks!

0 0

Replies

replied on October 12, 2020 Show version history

Hi Cindy,

I think you an extra "\" in your folder path between "%(Fields.Last)" and "%Fields.First)". Try this instead:
\Personnel\File Room\Active\%(Fields.Last#<.>#)\%(Fields.Last), %(Fields.First)\%(RetrieveFieldValuesforTimesheet_Document Type - PERS)

I didn't do anything with those numbers you mentioned that need to be ignored. Hopefully adjusting the existing path by removing the extra \ and adding in the comma and space will do what you're looking for.

Let me know if I need to clarify anything!

 

1 0
replied on October 13, 2020

Okay, my friend, you have gotten me further than I have been however, I still have issues.  As you can see it is still creating a whole new folder structure rather than just adding to what is already there.  I believe I have to take into account the numbers, I am not sure how to write (incorporate) a regular expression to help with that.  

0 0
replied on October 13, 2020

 

8.5.1

Is that number something that Workflow has access to? Is it a field value on the documents in question? We need to get that number in a token so we can add it to the correct location in the folder path.

 

0 0
replied on October 13, 2020

No, it is the employee ID, it is hand entered when the employee files are first entered into Laserfiche.  There is another workflow that takes that hand entered number and does a look up from an integration to create the initial folder and folder structure.  I just want to add this sub folder (Time Sheets) to that existing folder structure.  Some of these numbers are 4 digits and some are 5.  If there was a way to write an expression that would just accept that there is going to  be a 4 or 5 digit number at the end of the folder title and to ignore it that would make the most sense.  I feel like I have seen an expression to that effect..... I'm sorry this is so complicated. :( 

0 0
replied on October 13, 2020

I'm assuming the employee ID is in the folder name in case you have two employees with the same name. If we try to build a folder path in workflow that accepts 4 or 5 numbers at the end of the folder name, it won't know which to pick if we end up in a situation where we have two employees with the same name, which defeats the purpose of putting the employee ID in the folder name. But I'm making a lot of assumptions here.

How much of a hassle is it for users to enter the employee ID as a field value on these documents? If they provided the document type and the employee ID, you could probably query your data source for the rest of the information you would need (employee first and last name, for example) and then you'd have the document type token to create the last folder (Absentee Report, Address Change Form, etc.).

I would try to work with your VAR to get to a point where these two workflows are merged together. The folder structure doesn't need to be created prior to documents coming into Laserfiche - Workflow can dynamically create the folder path with tokens as needed. In the installations I've worked on in the past regarding personnel files, I've had success in asking users to give me the employee ID and document type, then using Workflow to get the rest of the employee data I might want, and using that data to route documents, all while only needing two pieces of data (employee ID and document type) from the user.

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

Sign in to reply to this post.