cancel
Showing results for 
Search instead for 
Did you mean: 

Inherit from parent folder

jynnyd
Champ in-the-making
Champ in-the-making
I have created in Share a text metadata called "Archives folder name".  It's on folders and files.

I would like the files under the folder to automatically inherit the metadata value if there is one.

Example:  

If a Folder has Archives folder name completed:   Project XYZ
Then the files under that folder all inherits the value Project XYZ

Is it possible to have/make that kind of behavior in Share?

Thanks!

1 REPLY 1

mlagneaux
Champ on-the-rise
Champ on-the-rise
I think you can use content rules to do that. Put a content rule on the root folder of Alfresco that also applies to sub-folder.
This rule is triggered when a node is created and can execute a JS script.

This JS script will get the "Archives folder name" property value on the parent folder and set this value on the node.
See the following links for the JS script:
http://wiki.alfresco.com/wiki/JavaScript_API_Cookbook
http://wiki.alfresco.com/wiki/4.0_JavaScript_API
http://wiki.alfresco.com/wiki/4.0_JavaScript_Services_API