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

Question

Question

Token Editor in Workflow, to extract Parent Folder Name from file path

asked on December 23, 2015

What regular expression do I need to use to get only the Parent Folder Name out of the current entry's file path?  I can get it to return the document name (current entry name), but I want it to return the name of the parent folder.  In this example, I want only the word TESTING returned as the resulting value:

Thx, Connie Prendergast (Flagstaff County, AB, Canada)

0 0

Replies

replied on December 23, 2015

That's what you would get though. Your test value is not an entry path. The Entry Path token for that "New Document" would be just \User Inbox\Connie\TESTING.

0 0
replied on December 23, 2015 Show version history

I'm wanting my workflow to look at the Parent Folder, retrieve a field value from the folder and use it on the document.  So I believe I need to isolate just the name of the parent folder (or folder ID) and not the whole path.  Is there another way I should attack this problem? 

WF Basics follow and it's Step #2 that I'm having problems with:

  1. Search Activity (Find these Documents via an Advanced Search within a bunch of folders)
  2. For Each Entry - Look at the parent folder and retrieve a specific field value.
  3. For Each Entry - Use this field value to decide what tag to assign on each of the Documents

 

Thx, Connie

0 0
replied on December 23, 2015

I believe something like the workflow below would do it:

You don't need the parent folder's name, the path is fine for Find Entry to get it. As of WF 9.2, Find Entry can also read the field for you. If you're using a lower version, add a Retrieve Field Values to get the field values from the entry generated by Find Entry.

1 0
replied on December 23, 2015

Right, I got it working!  I think I was hung up on the file path including the document name, which the "Current Entry Path" doesn't actually include.  (Overthinking it!  I should have just tried it.) 

Thanks!

0 0
replied on April 7, 2016

Excuse me i have the same issue. I want to retrieve a field value from the inmediatly parent folder and use it on the document.

Can you explain further? or maybe send me extract of this workflow.

Thank you very much!

0 0
replied on April 7, 2016

I got it already, thank you anyway. regards!

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

Sign in to reply to this post.