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

Question

Question

workflow to get the folder name where a document reside

asked on March 1, 2016 Show version history

Hi,

I have created a workflow that takes the document from one folder to another folder.  In the destination folder, I want to update a column in the template to contain the folder name and then rename the document to include the folder name as part of the document name.

 

For example:  The document (eg document name is Sample) resides on New Documents\Student Documents\Exam Board Documents folder.

 

I want workflow to update a field (eg Document Type) in the template of the document to contain Exam Board Documents

I want to rename the document from Sample to Exam Board Documents - Last Name, First Name

I have query in the workflow to retrieve the Last Name and First Name.  My problem is that I don't know how to retrieve the folder name where the document resides.  I don't want the full folder name to be part of the document name in the destination area,therefore, I cannot use Entry Path.

 

It is also possible for the document to reside further down in the file path, eg.  New Documents\Student Documents\Exam Board Documents\Exam Board.  Therefore, I want to get the last folder name in the filepath where I find the document.

 

Is this possible?

 

Thanks,

Teng

 

0 0

Replies

replied on March 1, 2016

You can use pattern matching on the Entry Path token to get just the folder name.

Something like ([^\\]+)$ ("anything but slashes, right at the end of the input string") should do it.

1 0
replied on March 1, 2016

Hi Miruna:

 

It works!  Thank you very much!

 

Teng

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

Sign in to reply to this post.