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

Question

Question

Search for specific subfolders when parent folder name is not known

asked on September 6, 2019 Show version history

I need some help with a search.  If you look at the pic you will see that I have a CLIENTS folder.  Inside the CLIENTS folder is a folder for each specific client.  Inside the specific client's folder is a folder for each program the client is receiving services in.   This could be one of several possible programs. I have a template attached to the program folder that includes a field named case_status.  If case_status = 1 the case is open, case_status = 0 the case is closed.  There are also subfolders under the program folder that uses the same template as the main program folder.  

I want to search for all programs folders that are case_status = 1.  I only want the program folder, no subfolders under it.  In this case, the folders highlighted in yellow are possible folders depending on the case status.  The blacked-outs rows are client folders with client names.

I'm not sure how I can search a child folder when the parent folders name varies.   Thanks in advance.

 

 

0 0

Replies

replied on September 6, 2019

If the folders have the case_status = 1 metadata value, couldn't you just search for folders with that metadata field value? If you have a metadata field value to look for, you shouldn't need to worry about the name of the parent folder.

For example, if you create an advanced search that looks within the CLIENTS folder, including subfolders, and returns Folders where case_status = 1, that should return the highlighted folders assuming they do have that metadata field value.

1 0
replied on September 6, 2019

But there are subfolders under the program folders that I do not want to be included.  They also have the case_status field on their template.  If I do a search I will get those included in the result.

0 0
replied on September 6, 2019

In that case it sounds like you need to set a template or some other field to distinguish between the program folders and the sub folders.

The parent folder names for the program folders are all different, so you can’t filter on that, and the sub folders have the same field value as the program folders, which means you don’t currently have it set up in a way that supports a sufficiently narrow search.

Any search criteria you create is going to apply to both the program folders AND the subfolders unless there’s some meaningful difference you can use to filter them out.

You are looking for case-status=1, with variable parent names, and the sub folders you don’t want also satisfy that criteria.

0 0
replied on September 6, 2019

That's kind of what I thought.  I was hoping to find a magical way of saying I only wanted to search down so many subfolder levels.  Apparently that is not the case.  I didn't want to maintain another template.

0 0
replied on September 6, 2019

Yea, there's not really a way to filter based on folder depth, and even if there was, it would be an extremely rigid/inefficient search.

You don't necessarily need a different template, you just need something that will allow Laserfiche to tell the difference; it could be an independent field, or a different field value within the same template.

If the parent folder names were more reliable you could use a parent name filter, but obviously that isn't an option for these types of folders.

If you only have 4 possible program folders, it's possible you could exclude those ParentName values from the search with advanced syntax, but that isn't a very efficient option and it wouldn't be the most reliable method either.

Is there a reason you have case status set on both the program folder and the subfolders?

1 0
replied on September 6, 2019

That's the other thing I was thinking.  I could ditch the case status on the subfolders.  What would be the best choice?  Keep the same template and leave the case_status blank and filter out folders with blank case_status fields or, create a new template excluding the case_status? 

0 0
replied on September 6, 2019 Show version history

I can't really say if one is better than the other because it very much depends on how you're using the metadata and templates.

I mean you could apply independent fields with no template at all, so it all depends on what functional requirements you anticipate.

Templates are great when you need to tell users what data to enter manually, or when you need to search, but if the data is set automatically they aren't 100% necessary.

Our HR folders have templates for employee folders, and they have child folders for different document types, but we usually don't set any metadata on the child folders.

1 0
replied on September 6, 2019

That all makes excellent sense.  I like to have the metadata on the docs and templates just in case someone decides to reorganize the data.  Obviously it allows us to do that via workflow when the data is attached to the folders and docs.

Thanks for the insight.  It is very much appreciated.

0 0
replied on February 4, 2020

If this is a frequent search, Jason's thoughtful recommendations for metadata changes are probably your best bet. However, as he noted, you're not limited to just the current entry's template --- or even to metadata at all.

You could also leverage workflow to run this search for you, depending on what you need it for, and take advantage of the fact that workflow can iterate through different folders and remember values with tokens.

Some other ways you could distinguish these documents:

1. Do the parent folders (those with the client's name) have the same template?

If they have a different template, you could use that to narrow your search.

For example, supposing the template on the program folders abd subfolders is called "Case File" and the template on the client folders is "Client Information"

{LF:ParentTemplateName= "Client Information”} & {[Case File]:[case_status]="1"}

searches for all documents where the Case File field "case_status" is 1 and the parent folder has the Client Information template.

If the client folders have no template or a varying template other than those on the program folders, you can exclude based on the parent template name as well:

{LF:ParentTemplateName<>”Case File”} & {[Case File]: [case_status]="1"}

2. Based on the type of entries in each folder level

For example, if your subfolders never contain an additional set of folders, or if the desired program folders only contain subfolders, you could filter on that.

To only return folders that also contain subfolders:

 {[Case File]:[case_status]="1"} & {LF:ChildName="*", Type="F"}

To only return folders that do not directly contain documents:

 {[Case File]:[case_status]="1"} - {LF:ChildName="*", Type="D"}
0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.