We have an employee folder structure that is setup as follows: Personnel Folders-> A-Z-> Employee Folder. I need to run a workflow on every employee folder in the "Personnel Folders" folder. Is there a way I can set Workflow to look in "Personnel Folders" and have it look in all of A-Z folders without having to create multiple Find activities to look in each letter folder?
Question
Question
Search for Entries in Multiple Folders
Answer
You can use the "Search Repository" activity in Workflow and incorporate the term {LF:LOOKIN="[RepositoryName]\Personnel Folders"} in your advanced search syntax. This will limit the results that get returned to entries that reside in that folder and its subfolders.
Replies
Can you do a regular Search Repository and tell it to look for only folders?
{LF:Name="*", Type="F"} & {LF:LOOKIN="Repo\Personnel Folders\", SUBFOLDERS=0}
Type="F" tells it to only return folders.
How do I get it to look only for the actual documents? I also tried "Find Entries" but that only looks at the top level folders or record series and not the documents within those.
We have a main record series with all documents filed by date - so we have a ton of date folders. I am re-doing these to file by MM/yyyy, so I want to look at every document within those folders to have it re-file. Find entries isn't working for this. I tried Search Repository and even though when I test the query it returns 2429 entries, the rest of my workflow is not processing them. If I point it to a single document and play it, it works perfectly. Any suggestions on how to skip the (540) folders and return only all of the documents within them?
After you use the "Search Repository" activity and it finds your entries, are you then using a "For Each Entry" activity and iterating through each of the search results and processing each one as desired? Note for the activities inside the loop, the ones that you want to be performed on each of the documents found in in the search, make sure that the activity is configured to run on the current entry of the loop and not the starting entry.
Yes. Workflow below. It does a For Each - retrieves values - if they are a single doc date it moves them to a new folder, if not, it does nothing. They are configured to run off the output entries of the Search Repository.
Edit: Nevermind - they were all set to run off the output entries except Retrieve values - I changed that and ran it and it still did not work, so I posted the response. As I sit here, it finally started working, I guess it just took a few (10) minutes to actually start doing something. Sorry, yes, this did solve my issue. I guess I should have troubleshot a bit before posting.
Glad to hear it's working now.