Use document's metadata for filename (Quick Labels)

244 views
Skip to first unread message

Martin Kinitzki

unread,
Aug 8, 2018, 8:59:57 AM8/8/18
to Mayan EDMS
Hey guys,

is there any way to use a document's metadata (I added a metadata field for suppliers) for renaming documents via quick label? I tried it with {{ document.metadata_value_of.supplier }} with supplier being my metadata field. Unfortunately it takes {{ document.metadata_value_of.supplier }} as a String. 
The reason is that I would like to have the filenames in that way: YYYY-MM-DD Invoice Supplier

Thanks in advance.

Roberto Rosario

unread,
Aug 8, 2018, 5:10:00 PM8/8/18
to Mayan EDMS
We've been testing ideas for something like this. Unfortunately it would only work once the document is uploaded and available in the system. This is because during the upload wizard the document still doesn't exist and cannot be referenced by a template variable like {{ document...}}. Templated quick labels would only work after the document is uploaded by going to the document properties edit view. 

A related feature we are working on right now is allowing the renaming of a document via workflow actions. This way a document is uploaded and when the workflow triggers a state (initial or otherwise) the rename action is executed. In this format a templated label field would have access to all of the document's properties including metadata values. This is in the works right now and very possible to be included in the next release (version 3.1).

Martin Kinitzki

unread,
Aug 9, 2018, 3:32:59 AM8/9/18
to Mayan EDMS
Thanks for the answer! Looking forward to the next version. Any rough estimate on the release cycles?

Roberto Rosario

unread,
Aug 15, 2018, 4:34:54 PM8/15/18
to Mayan EDMS
Support for renaming a document via the workflow was added. 

We added a sample workflow to describe your scenario as it has been requested a few times. This is what we ended up with:

A workflow of two states and two transitions is need. The first state renames the document based on a template that has access to the document's metadata. The renaming of the document triggers a transition to a second state. The workflow sits idle in this second state until a metadata is edited. Any metadata update triggers the workflow to transition to the first state where it is renamed again. This allows the document to be renamed upon upload and if the metadata changes later on.

Release date is uncertain as there are still 80 items in the shortlist for this version and we are still working on the SQLite to PostgreSQL database conversion command (this is one is the top priority for the next version).
Reply all
Reply to author
Forward
0 new messages