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

Question

Question

Workflow to find Specific Folder by looking for a word in a Field on the Folder

asked on October 28, 2016 Show version history

I would like WF to be able to take a project # off a document, then go look for that project # in a field on a folder in order to be able to direct WF to move the document to that folder.  Can it be done?

I can see that it might look something like this:

  • Retrieve Field Value (of the Project #)
  • Putting the Project # in a token?
  • Find the folder using a search syntax (see below) but how do I get WF to use the Project # or token in this field search?
  • Then finding the Path of that folder,
  • Then Route Entry to the right folder.

 

0 0

Answer

SELECTED ANSWER
replied on October 28, 2016

1 0

Replies

replied on October 28, 2016

Thanks, Junaid!  That definitely helped!  The WF still terminated.  Can you see what else I might be missing?

Actually, after I took this printscreen, I changed the token in Route to folder to "%(SearchRepository_FirstResult_Path)" not FullPath and that worked somewhat, as it needed to go one more folder deep.  Why did "Path" work, but "FullPath" terminate?

0 0
replied on October 28, 2016

We'd have to see the error message, but my guess would be that because Junaid's search does not specify entry types, you got multiple entries and the first one was s a document. So full path was the document path + document name and making a shortcut into that was not possible, where path is just the folder where the document is located.

0 0
replied on November 2, 2016 Show version history

EDITING THIS POST:  I got it working!  (See next post.)

Miruna, I did adjust Junaid's suggestion to include the Type="F".  Hopefully, I did it correctly.

I wonder if what I'm doing wrong is in the token choice in the Route to Folder activity:  %(SearchRepository_FirstResult_FullPath).  Or how I've configured the activity where it is to find and record the path.  When I use Track Tokens and try to see the path it grabbed, I find nothing but a count (1, or 0).

0 0
replied on November 2, 2016

I got this working perfectly (at least first test says I did!)!  I went back and completely rebuilt this WF.  I removed the section where I was trying to "Create Tokens" for each project number, reviewed all the activities and made changes and then it worked!

This is a "For Each Value" activity set to look at each "%(RetrieveFieldValues_Project No._All)"; then "Search Repository" activity with this in the Search Query "{[]:[Project No.]="%(ForEachProjectNumberfound_Current Value)"} & {LF:Name="*", Type="F"}"; and the Route to Folder activity with this token "%(SearchRepository_FirstResult_FullPath)".  The final result, run on a test document with two Project Numbers in that multi-value field, created two shortcuts in the appropriately matched folders!  Yeah!

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

Sign in to reply to this post.