cancel
Showing results for 
Search instead for 
Did you mean: 

Assigning values to aspect properties with rule

robl
Confirmed Champ
Confirmed Champ
Working with a competitor's product (Interwoven iManage/FileSite), I was able to populate the values for the metadata based on the folder / space where a document is stored, saving the end-user from having to manually type in the metadata.

For Example, we would have a custom aspect that would include a client ID number and a project ID #.  This aspect would be added to all documents under /Company Home / Client Files. 


/ Company Home
    / Client Files
           / John Doe - C12345
                   / Old Project - P001
                   / New Project - P002
           / Mary Smith - C12346
                   / Some Project - P001
                   / Another Project - P002

Given the above folder/space structure and a document is stored in / Company Home / Client Files / John Doe - C12345 / New Project - P002, can a rule assign ClientInfo Aspect property values of the Client ID = C12345 and Project ID = P002?  If so, how is that implemented in Alfresco?

Any guidance would be greatly appreciated.

Thanks!

Robert
4 REPLIES 4

norgan
Champ in-the-making
Champ in-the-making
Hmm …
you could use tagging and categorization for that. WOuld, at the same time, offer you a neat alternative navigation using tags. Smiley Happy

robl
Confirmed Champ
Confirmed Champ
Hmm …
you could use tagging and categorization for that. WOuld, at the same time, offer you a neat alternative navigation using tags. Smiley Happy

Actually, I hadn't thought about using the category / tagging feature set.  I am used to dealing with more structured metadata, i.e., a mandatory "Client" and "Project" field.  I imported a small set of test documents and used a "Link to category" rule, which seemed to allow me auto-classify the documents.  However, I am wondering how well this would scale, should the list of clients exceed several hundred and with some clients having 50+ projects. 

Thanks for the suggestion, Norgan

robl
Confirmed Champ
Confirmed Champ
Ok, it seems that the following javascript script code snippet will allow me to assign values to my custom aspect / properties.


document.properties["QQ:clientNumber"] = "C0000001";
document.properties["QQ:projectNumber"] = "P00002";
document.save();

The question is how to extract the client number / project number from the space/folder containing the document.

maxxer
Champ in-the-making
Champ in-the-making
did you manage to solve your issue? I'm interested as well!
thanks