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

Question

Question

Excluding folders from search

asked on October 10, 2017 Show version history

I want to exclude documents contained within specific folders in my search.  My search looks like this...

 

({LF:LOOKIN="\Folder 1", SUBFOLDERS=1}-{LF:LOOKIN="*Folder 2"}) & {[]:[Number] = "12345"}

 

I want to search for all folders and documents that have a metadata field called "Number" with a value of "12345".

I want to search in \Folder 1 and all subfolders...

EXCEPT for any subfolder named "*Folder 2" (notice the asterisks in the folder name).

 

I hjave tried various combinations but the documents that are in the "*Folder 2" folders (there are many "*Folder 2" subfolders) still show up in the search results.

 

We are using Web Access v 10.2

 

0 0

Replies

replied on October 11, 2017

Is "*folder 2" the same name all the time?  Or are you using the * as a wild character?  If the folder name you want to exclude is always the same, then try something like this - 

 

({[]:[Number]="12345"} & {LF:LOOKIN="\Folder 1"}) - {LF:LOOKIN="\Folder 1\*Folder 2", SUBFOLDER=0}

0 0
replied on October 11, 2017 Show version history

The *Folder 2 folder is always the same name.  The asterisks is not a wildcard character, it is the first character of the folder name. 

The *Folder 2 folders are not just subfolders of Folder 1.  They can be many levels deep into the folder structure so saying "\Folder 1\*Folder 2" won't work.

I thought about using the ({[]:[Number]="12345"} & {LF:LOOKIN="\Folder 1", SUBFOLDER=1}) - {LF:ParentName="*Folder 2"} which seems to work except it is possible that we could have documents in subfolders that are in *Folder 2 and we would want to exclude those documents as well.  For example, we could have "\...\*Folder 2\Another Folder\And Another Folder\MyDocument".  In this case we would want "MyDocument" to also be excluded from the search results, so I am not sure "LF:ParentName..." will work in this case.

0 0
replied on October 11, 2017

Parent name would not work since the Parent name of MyDocument would be And Another Folder.

 

But setting the Subfolder=0 in the search will exclude all subfolders under that folder name.  But that won't matter if you are looking at more paths.

0 0
replied on October 11, 2017

What is the ultimate purpose of this search?  A saved search users and run?  Or is this for a workflow?

 

0 0
replied on October 12, 2017

The purpose: 

Our Laserfiche structure contains an Underwriting folder that then contains a folder for all our applicants and a separate folder for all our policies.  The applicant folder then contains a folder for each of our applicants and the policy folder contains a folder for each of our policyholders.  Then in each of those folders there is a number of folder, one of them being a folder called "*Recycle Bin".   We do not give our users the ability to delete documents so when they want something removed from their folders they move it to the *Recycle Bin.  Every applicant/policyholder has a separate *Recycle Bin folder.

 

So for example, the Underwriting folder structure will look something like this...

 

\Underwriting

      \Applicant

            \Applicant1

                  \*Recycle Bin

                   \Applications

                   \Correspondence

                   \Tasks

            \Applicant2

                  \*Recycle Bin

                   \Applications

                   \Correspondence

      \Policy File

            \Policyholder1

                  \*Recycle Bin

                   \Initial App

                   \Correspondence

                   \Billling

            \Policyholder2

                  \*Recycle Bin

                   \Initial App

etc.

 

We do an indirect "integration" with Laserfiche and our in-house application by doing a Shell Execute with the URL of the search criteria.  The in-house application contains a "Laserfiche" button in the application.  When the user presses the Laserfiche button the application builds an http request that contains the search criteria which searches within the \Underwriting folder (and all its subfolders) for a value in a specific field which identifies the applicant/policyholder they are viewing.  The search results will contain a list of all documents relevant to that applicant/policyholder.

Where my questions comes into play is that they do not want the search results to include any documents in the *Recycle Bin folder.  So I need to be able to figure out a way to exclude any documents in the *Recycle Bin and any documents in the subfolder tree of the *Recycle Bin.

 

Long explanation but hope this gives you a better understanding of what I am trying to accomplish.

0 0
replied on October 12, 2017

I have not come up with a way to exclude by folder path. 

It would not be clean but one workaround could be creating a tag (something like IgnoreSearch) and automatically applying it to the *Recycle Bin folder when they are created.  Then have a workflow that applies it to all entries dragged into the folder.  Then write your search to exclude entries with the tag.

Or make a security tag that only Admins have the rights to see.  Then write a workflow that will apply the security tag to each entry as it is moved into the *Recycle Bin folder.

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

Sign in to reply to this post.