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

Question

Question

Search Assistance

asked on March 25, 2017 Show version history

Hi All, 

 

Was wondering if i can be assisted regarding the search i am trying to perform.

 

Basically, i have a metadafield that is a required field (Client Code). The folder structure is based on this code.

 

I would like to do a search for any documents within the folder structure that the Client Code is not the actual Folder name? How do i go about doing this? 

 

What i need to do for this, is find any documents that should not be in the folder and move them to the correct folder using a workflow. But, my first hurdle is the search i need to achieve this? 

 

I have started with the following:

1. Find me all documents with the Client code fields as a "*"

2. Within this folder

 

But, how do i tell it to find me the documents that should not be in the folder(s) that have the wrong Client code, 

 

I need to match the Client code with the folder name and this is where i am stuck!

 

Help? :)

 

Thank you in advance, 

Regards

Ziad

0 0

Answer

SELECTED ANSWER
replied on July 18, 2017

It may be slow running because it will run a search on each Client Code folder, but I would run a search to get all the Client Code level folders.  Then in a For Each loop, run a search for all documents within the the current loop entry.  Then you have another For Each loop that checks each entry returned.

0 0

Replies

replied on March 27, 2017

The search you want to use is

{[]:[Field Name]="value"} - {LF:LOOKIN="\Path\to\parent"}

Any hits from this search will be for documents in the wrong folder.

0 0
replied on July 18, 2017

Hi Bert, 

 

Apologies I have taken so long to respond, but a quick question regarding this search, how do I for example target a folder structure that has over 1500 folder.

 

As in, 

Each folder is named based on a Client Code, within that Folder there are 2 folders 

1. General

2. Other

 

The documents reside in those two folders under the Client Code, so:

 

Client Code - GENERAL - Documents with Metadata Fields
                       OTHER - Documents with Metadata Fields

 

The metadata is within the documents in those two folders.

What I want to target are the documents within those folders that have the Client Code Metadata Field and compare that with the parent folder name and find the ones that do not match? 

 

Can this be done? 

 

Thank you

Ziad

0 0
SELECTED ANSWER
replied on July 18, 2017

It may be slow running because it will run a search on each Client Code folder, but I would run a search to get all the Client Code level folders.  Then in a For Each loop, run a search for all documents within the the current loop entry.  Then you have another For Each loop that checks each entry returned.

0 0
replied on July 23, 2017

That is perfect Bert, I used your setup to create what I required and initial testing works perfectly. I also now added a date calculator to make sure it does not pick up every document every night and only target the date it is running so it only targets a small number of files. 

 

Thanks Bert, 

Ziad

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

Sign in to reply to this post.