cancel
Showing results for 
Search instead for 
Did you mean: 

Add a global counter?

e-no91
Champ in-the-making
Champ in-the-making
How do I add a global counter to keep track on how many documents have been uploaded to a folder?
I'm thinking of adding a property to the folder that keeps the number of documents uploaded, though I may need to runas admin to update the property.

Is there any other simpler way?
Thanks in advance!
3 REPLIES 3

marsbard
Champ in-the-making
Champ in-the-making
This blog post talks about adding quotas to folders which while not what you're asking for may have valuable clues: http://nathanmcminn.com/node/7

Specifically it uses the OnContentPropertyUpdatePolicy to do its work: http://dev.alfresco.com/resource/docs/java/repository/org/alfresco/repo/content/ContentServicePolici...

crono40
Champ on-the-rise
Champ on-the-rise
Maybe you can do it with a script and a rule. Trigger it when file are created in the folder.

You put the counter in the folder description and get it at the beginning. If the counter is null set it to 1 of just increment it when a file is added and save the curent node.

e-no91
Champ in-the-making
Champ in-the-making
Yup, this is how I do it. Thanks!