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

Question

Question

Update Folder Template Field

asked on April 29, 2015

Hello Everyone,

This would seem simple but the Workflow mechanics are escaping me.  My client has many existing folders (one per chemical).  They would like a Folder Template Field to reflect the creation date of the last document scanned into that folder and of course automatically update with each new scanned document.  Any help would be appreciated!

0 0

Answer

APPROVED ANSWER
replied on April 29, 2015

Here's a sample workflow that should work:

And here's the starting rule:

Starting Event: Entry Created
Run workflow on the entry that was created

If all of these conditions are true
        Entry : Type equals Document
        Entry : Path starts with \Workflow Testing\UpdateParentFolderField
        User does not equal workflow

So any document scanned (created) in any folder that resides along the path starting with \Workflow Testing\UpdateParentFolderField will trigger the workflow which gets the creation date of the document and updates the Date field of the parent folder.

0 0
replied on April 30, 2015

Thanks Alex it works perfectly.  Just what they needed.

Jeff

0 0

Replies

replied on April 30, 2015

Hey Alex,

I don't want to create a new question, but something similar I am looking for...

I have a folder which has many subfolders, so the requirement is that subfolder should have Creation Date assigned as per the oldest document inside the folder.

 

I have a template assigned (Original) to documents which contain creation date.

 

So graphically it would be like.

Folder A

Subfolder A1

Document 1a

Document 2a

Document 3a (with lowest creation date)

Subfolder A2

Document 2b (with lowest creation date)

Document 3b

 

So the Subfolder A1 should be assigned Template (Original) & the dates should be from Document 3a

Same way Subfolder A2 should get the date from Document 2b

 

It's only a one off, so I can actually move the whole folder to different location to trigger the WF.

 

Thanks a lot in advance.

 

Sahil 

 

0 0
replied on April 30, 2015

Sahil,

Assuming that the documents are already in the folder and you don't have to account for any changes such as new documents being added or perhaps documents being removed, then here's a sample workflow that should work:

The idea is that you use a "Find Entries" activity to get all the subfolders. Next, using a "For Each Entry" activity you can use a custom query that finds the oldest creation date of a document in that specific subfolder. Then you assign that date value to a template field on the subfolder. The looping just processes this for each subfolder.

1 0
replied on April 30, 2015

Alex,

Thanks a lot! 

Will try & report back.

Thanks again.

0 0
replied on May 1, 2015 Show version history

Alex,

When I go to "for each subfolder" & want to specify "find subfolders: output entry", there is nothing to specify, when I click on select, it's empty...

 

What am I missing?

 

Also, I have never used Custom Query, could you please explain how did you select your Repository to be the Data Source?

 

Thanks.

0 0
replied on May 1, 2015

You've confirmed that you have a "Find Entries" activity first followed by the "For Each Entry" activity?

0 0
replied on May 1, 2015

Yes

0 0
replied on May 1, 2015

If your workflow looks like

but you're unable to select the Output Entries from the previous Find Entries activity, then open a support case and provide a copy of your workflow as we'll need to investigate.

0 0
replied on May 1, 2015

ok, I am doing now

0 0
replied on May 1, 2015

Thanks a lot Alex!!!

Very kind of you to help so much!

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

Sign in to reply to this post.