cancel
Showing results for 
Search instead for 
Did you mean: 

Exportin metadata

beliasnkyas
Champ in-the-making
Champ in-the-making
Hello!
I am newcomers in alfresco.

How to get metadata afte cliking "ok", when i save them? I must to get metadata and write them to file?

I have no idea how can i do this.

Please, give me a hint! 
7 REPLIES 7

rjohnson
Star Contributor
Star Contributor
Find your document in the document library, click on the title (that will display the document) then at the bottom right you will see the metadata. To edit it, click "Edit [properties".

Bob

beliasnkyas
Champ in-the-making
Champ in-the-making
rjohnson, thanks for answer. But i need to run my program by clicking "ok"(finish-button) button on the property sheet. And this program need to access to new posted metadata.

rjohnson
Star Contributor
Star Contributor
OK. So I can be of some help, once you have got the metadata that way, what do you want to do with it?

beliasnkyas
Champ in-the-making
Champ in-the-making
I will write them into excel-file. I think custom action will be usefull. And may be I can will apply a rule to the content(or space).

rjohnson
Star Contributor
Star Contributor
OK. Can I be clear about what you are trying to do.

You want to add / edit metadata on a document in Alfresco and then when you click "Save" (or "Create") write the metadata into an Excel file.

Is that correct?

Bob

beliasnkyas
Champ in-the-making
Champ in-the-making
Yes.

rjohnson
Star Contributor
Star Contributor
There is no built in way of doing this.

One way would be to create a rule on the relevant folder(s) that is triggered when a document is added or updated. In this code you can then iterate through the metadata in a variety of ways using document.properties. document.properties is a associative array of the metadata so you can do a for each through the keys and then indirectly access each array element. You can then build the data into a suitably formatted csv string and append this to a document in Alfresco or you could write it to an external file (but that would require a java bean).

There is an example of appending data to an Alfresco document in the javascript cookbook (which is on-line) its in the "Create a backup of a document" section if memory serves.

You can then open your csv document in Excel.

If you wrote the java bean to write to an external file then you could write directly into Excel format if you used the Apache POI libraries.

Bob Johnson