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

Question

Question

workflow to get the name of the parent folder it was dragged into

asked on September 30, 2019

I am trying to create a workflow which will get triggered when anyone drags a file into the repository. It should get the project number value from the parent folder's template and add it to the file dragged in. For example if I were to drag a file into subfolder (a1), the workflow would get the template data(Project Number) from 'Folder A' and apply it to the file/files dragged in. 

Folder A (parent)

 -- Subfolder (a1)

I believe this can be achieved in LF, but if not please advise as to a better way to address this issue. 

Thank you
 

0 0

Answer

SELECTED ANSWER
replied on September 30, 2019 Show version history

I would use a Find Entry activity and then use a regular expression on the Current Entry Path token.

The Regular Expression I would use is

^([^\\]*\\[^\\]+\\[^\\]+)

This will retrieve the path to the project folder.

 

Then I would also add Fields so that it retrieves the data I want to apply to the document during the Find Entry process.

3 0

Replies

replied on September 30, 2019

What determines the parent folder with the metadata to get?  As long as there is a defined way to know where the data is, then you can retrieve it and apply it to your new document.

 

What if the file is dropped into a subfolder of a subfolder (or deeper nested)

Folder A (parent)

 |-- Subfolder (a1)

 |  |--Subfolder (a1-1)

 

0 0
replied on September 30, 2019

The structure we hope to adhere to will be:

Engineering:

    --Project Name

        --Subfolders 1

        --Subfolder 2

There won't be a subfolder within the subfolder  and all documents dragged in will be in  subfolders Only.

Any pointers would be greatly appreciated. 

0 0
SELECTED ANSWER
replied on September 30, 2019 Show version history

I would use a Find Entry activity and then use a regular expression on the Current Entry Path token.

The Regular Expression I would use is

^([^\\]*\\[^\\]+\\[^\\]+)

This will retrieve the path to the project folder.

 

Then I would also add Fields so that it retrieves the data I want to apply to the document during the Find Entry process.

3 0
replied on September 30, 2019

When building a Metadata template, if you enter %(parent) as the default value for a field, the field will inherit the value from the parent folder when the parent folder has the metadata fields already defined.

Also, you can find a documents Parent Folder ID, path, etc by using a Find Entry activity

0 0
replied on September 30, 2019

One thing to mention here, that only works for copying from the direct parent and only for single-value fields.

0 0
replied on February 6, 2021

Hi, I am wanting to do something similar to this but instead of pulling data from the parent FOLDER, I need to pull metadata from a document already living in the folder. Here is what I have so far. My problem is, none of the metadata from the found entry in the entry path folder is being assigned to the fields on the new entry's template. 

0 0
replied on February 8, 2021

You have it set up so the Find Entry activity is returning the parent folder.

How do you distinguish this document you want to copy from from the other documents in this folder?

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

Sign in to reply to this post.