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

Question

Question

Token for Root folder name

asked on January 16, 2017

Hi,

 

I am building a template.  Requirements is that one of the fields reflect the "root folder name" for any documents and no matter the depth of the folder that contains this document.

 

Thank you,

0 0

Replies

replied on January 16, 2017

What do you mean by that? The "root" folder is the one at the top of the folder tree, named after the repository.

0 0
replied on January 16, 2017 Show version history

A root folder is any folder a the top level within the repository i.e. not a subfolder. A folder whose parent is nothing but the repository...

0 0
replied on January 16, 2017

There is no token in the Client for it, but you can build it from the full entry path with pattern matching in Workflow. You'd need Workflow anyway if you want to keep it in sync as the document moves around the repository.

0 0
replied on January 16, 2017

ok.  Can you be more specific on this workflow and why do you see its permanent requirements instead of just building the formula for this token from a workflow?

0 0
replied on January 16, 2017

Do documents move between these 1st level folders? If they do, does the field need to be updated to reflect the new folder or is it intended as an indication of where the document originated?

0 0
replied on January 16, 2017 Show version history

Good point.  Prior to LaserFiche, customer worked with a regular Windows based folder to store their documents.  Problem is sometimes users inadvertently moved documents around this huge structure and as a result some documents would be misplaced and couldn't be found when queried under a specific top folder. 

 

With LF we not only want to prevent this problem but we also want to be able to quickly zero in on such documents based on the root folder name

0 0
replied on January 16, 2017

Ok, so are you relying on the user to know the difference between a "good" move and an "accidental" one and update the field? Or how will these documents be kept in sync?

As far as the workflow goes, the initial one would be something along these lines:

1. search for the first 100 documents with that field value blank

2. For each document:

3. Extract the first folder from the entry path. Regular expression, "everything that's not a backslash after the initial backslash in the path": \\([^\\]+)

4. Set field value on the current document to the token created at step #3

5. Schedule this workflow to run every few minutes

0 0
replied on January 16, 2017 Show version history

Users cannot be trusted.  Accidental moves can happen and that is what we're trying to circumvent. System should be able to tie up any file with its top folder that it belongs to during the creation of such file.  If somehow file becomes misplaced i.e. is moved (more than likely in an accidental move) under a different top folder then we want both the ability to locate this file as well as relocate it under the top folder that it belongs to.

 

I am assuming in your Step 1, that it is a SQL query you refer to in the workflow.

 

I get the idea though. Thanks for your insight.

0 0
replied on January 17, 2017

No, I meant a repository search in the first step.

As far as documents being moved accidentally, you could also run a workflow to get a daily "report" when it finds documents with fields not matching their current location.

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

Sign in to reply to this post.