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

Question

Question

Search Criteria to not include a specific Folder Name

asked on October 2, 2017 Show version history

Hi All,

 

I have a Workflow that I am using to Target documents within the Repository folders that are saved incorrectly. i.e Based on a metadata field (Client Code) does not equal the folder name, then move the file to the correct folder. 

 

Each Client Folder has a min of 2 folders that (Folder 1 and Folder 2) which works perfect, but we have another folder at times within the client folder (Folder 3) that I want to exclude from the search as it does not need to be touched. Please note that not all the client folders have folder 3. 

 

In the first instance of my testing, the following search was done: {LF:Name="*", Type="D"} & {LF:LOOKIN="%(ForEachEntry_CurrentEntry_FullPath)"} - {LF:Name="Word Document.docx", Type="D"} : This is used to make sure that word document is never included in the search. 

 

Question is, how do I add the Folder to not be included in the search? When doing the following: 

{LF:Name="*", Type="D"} & {LF:LOOKIN="%(ForEachEntry_CurrentEntry_FullPath)"} - {LF:Name="Word Document.docx", Type="D"} | {LF:Name="*", Type="D"} & {LF:LOOKIN="%(ForEachEntry_CurrentEntry_FullPath)"} - {LF:Name="Folder 3", Type="F"} - It moved all the Folder 3 folders within the repository into a completely different location. 

 

When testing the following: {LF:Name="*", Type="D"} & {LF:LOOKIN="%(ForEachEntry_CurrentEntry_FullPath)"} - {LF:Name="Word Document.docx", Type="D"} & {LF:Name="Folder 3", Type="F"} this did no function properly either. 

 

The idea is to have this run once, and then thereafter have a workflow that will run everyday for the specific date: {LF:Name="*", Type="D"} & {LF:LOOKIN="%(ForEachEntry_CurrentEntry_FullPath)"} & ({LF:Modified="%(TodaysDate_DateTime 1)"}|{LF:Created="%(TodaysDate_DateTime 1)"}) - {LF:Name="Word Document.docx", Type="D"} which then I will need to add the folder to be excluded. 

 

Please advise?

Thank you

Ziad

0 0

Answer

SELECTED ANSWER
replied on November 1, 2017 Show version history

Hi Ziad,

Yes, that does provide more detail. In that case you can use two Find Entries activities and two For Each Entry loops

 

Find Entries #1: Finds each Client Folder

For Each Entry #1: For each Client Folder

Find Entries #2: Finds each subfolder in the Client Folder

For Each Entry #2: For each subfolder of that Client Subfolder

 

The second Find Entries activity will look for folders in the full folder path of the Current Entry (current Client Folder).

 

 

 

2 0

Replies

replied on October 2, 2017 Show version history

You need to be using parenthesis to indicate the grouping of your search.

The search operators page in the help files talks about the automatic precedence, but the crux of it is that the search service doesn't know how you want your various terms grouped unless you use parenthesis, so it has a default interpretation. It's always best to use parenthesis for combined operators to make sure your syntax says what you intend.

You also have Type="D" (meaning type = Document) before your folder-excluding criteria, which basically means "find all these documents (not folders), then exclude this folder".

I'm a little confused about what you want to search for. Do you want this workflow only to process non-Word documents, or to process non-Word documents AND process folders EXCEPT folder 3?

 

If you don't want to return any folders, you can just use the "Type" specifier to make sure only documents are returned:

({LF:LOOKIN="%(ForEachEntry_CurrentEntry_FullPath)"}&{LF:Name="*", Type="D"})-({LF:Name="Word Document.docx", Type="D"})

If you want to include other folders but exclude folder 3 specifically:

({LF:LOOKIN="%(ForEachEntry_CurrentEntry_FullPath)"})-({LF:Name="Word Document.docx", Type="D"} | {LF:Name="Folder 3", Type="F"} )

That will search for anything in the patch that is NEITHER a word document NOR a folder name Folder 3. As such, all other document types and all other folders in that path will be returned.

1 0
replied on October 3, 2017 Show version history

Hi Brianna,

 

Basically, the third folder is only created when a business process is run which then creates the word document in the parent folder. In my Workflow search though, i would like to ignore the third folder that was created and also the word document as they should not be touched at all. This also includes all documents in the third folder. 

 

Would the above search still return the entries in Folder 3? or would it ignore the files within Folder 3? Screenshot below showing the Third folder and the Word document that requires to be ignored within the client folder:

 

 

Thank you

Ziad

0 0
replied on October 3, 2017

Hi Ziad,

It's still not clear what you are asking for.

  1. Do you want any folders (not their contents, but the folders themselves) to be returned in this search?
  2. If you DO want to return some folders, are you trying to exclude the third folder itself, or exclude documents within that folder? (or both?)
  3. Is this third folder consistently named?
0 0
replied on October 3, 2017

Hi Brianna, 

 

Thank you for the response, 

I would like to exclude (both) the third folder and all its contents from our search as I do not want the WF to work on it. Also, the folder is always named the same.

 

Thank you

Ziad 

0 0
replied on October 7, 2017

Hi Brianna, 

 

Just a quick update regarding this, the search used can now ignore the folder and the word document by a slight modification as per below: "Removing the | and adding another -"

 

({LF:LOOKIN="%(ForEachEntry_CurrentEntry_FullPath)"}) - ({LF:Name="Word Document.docx", Type="D"} - {LF:Name="Folder 3", Type="F"} )

 

But, this search still is looking into the third folder contents and then moving the files, which i do not want to happen as i do not want this folder touched at all? 

 

Is there a way i can exclude the folder and the files within the folder to not be included in the search?

 

Thank you

Ziad

0 0
replied on October 22, 2017

Hi Brianna, 

 

Any updates on this? Is there a way when I do not want to include the folder in my search to also exclude the files within that folder? At the moment, those files are still being moved. 

 

Please advise, 

 

Thank you, 

Ziad

0 0
replied on October 24, 2017

Hi Brianna, 

 

Any updates on this? Is there a way when I do not want to include the folder in my search to also exclude the files within that folder? At the moment, those files are still being moved. 

 

Please advise, 

 

Thank you, 

Ziad

0 0
replied on October 24, 2017

Hi Brianna, 

 

Any updates on this? Is there a way when I do not want to include the folder in my search to also exclude the files within that folder? At the moment, those files are still being moved. 

 

Please advise, 

 

Thank you, 

Ziad

0 0
replied on October 31, 2017 Show version history

Ziad,

If your folder structure looks like: 

Client

      Folder One

      Folder Two

      Shared < do not move this 

      Word Document < do not move this

Use the Find Entries activity to retrieve all the folders in the Client folder. To exclude the Word Document, add a filter to only include folders. Under additional properties, collect the entry Name

Within a For Each Entry activity for this Find Entries activity, add a Conditional Sequence. In this Conditional Sequence you add your routing/move entry activities based on your conditions. The condition of the conditional sequence to run is that the Current Entry's name does not equal "Shared". That way the routing activities will not run on the Shared folder or Word doc.

If I misunderstood your question, feel free to clarify. Thanks.

0 0
replied on October 31, 2017

Hi Tri,

 

Would the above work with the following folder structure:
We have about 1000+ client folders as per below (please note that some do not have the shared folder or the word document there either) this was the reason I was leaning towards the search Repository option within Workflow:

 

Client00 

        Folder 1

        Folder 2

        Shared

        Word Doc

Client 01

        Folder 1

        Folder 2

Client 03

        Folder 1

        Folder 2

        Shared

        Word Doc

 

Hope this provides more details,

 

thank you

Ziad

 

0 0
SELECTED ANSWER
replied on November 1, 2017 Show version history

Hi Ziad,

Yes, that does provide more detail. In that case you can use two Find Entries activities and two For Each Entry loops

 

Find Entries #1: Finds each Client Folder

For Each Entry #1: For each Client Folder

Find Entries #2: Finds each subfolder in the Client Folder

For Each Entry #2: For each subfolder of that Client Subfolder

 

The second Find Entries activity will look for folders in the full folder path of the Current Entry (current Client Folder).

 

 

 

2 0
replied on November 1, 2017

Hi Tri, 

 

Thank you for this, i will be testing this as soon as possible, 

 

Thanks again,

Ziad

0 0
replied on November 1, 2017

Hi Tri,

 

I have just used your feedback for this and created the below to track each document and move it accordingly. I have been testing this thoroughly and it is working as it should. 

 

 

Thank you so much for your assistance in this matter, 

 

Regards

Ziad

3 0
replied on October 2, 2017

Assuming I'm understanding your situation correctly, I'd try something like

{LF:Name="*", Type="D"} & {LF:LOOKIN="%(ForEachEntry_CurrentEntry_FullPath)"} - ({LF:Name="Word Document.docx", Type="D"} | {LF:Name="Folder 3", Type="F"})

I don't remember what the order of precedence between the |, &, and - operators is, so the parentheses might not be necessary (but they make the intent clear, if nothing else).

You are not allowed to follow up in this post.

Sign in to reply to this post.