• Property groups / assigning of unique docket number

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #30450  by janus
 
Hello!

Even though the property groups -feature is powerful for structuring the metadata of a document, I've run into a small problem. I couldn't find an answer in the wiki documentation or on the forums on how to configure the a property group in the repository in such a way, that it could automatically generate a unique docket number. Because of NGO-government body interactions and accountability requirements, my team would certainly need this kind of functionality.

Our old docket number format uses a four-digit integer for the domain of the document, a one letter code specifying type, followed by a six-digit integer, which is the unique "ordinal number" of the document and finally a four-digit integer for the registration year, all which are separated by a slash, "/". All the other parts are non-unique and can (and should) be entered manually, but generating the unique identifier is the problem, so a simple howto would be greatly appreciated.

It would also be appreciated, if someone could find a way to generate the whole docket number as one string from the data above, so that eg.

Domain: 2100
Type: S
Number: nnnnnn (this one unique and automatically assigned)
2014

...would become 2100/S/nnnnnn/2014

Thanks in advance.
 #30478  by jllort
 
In our utilities I think you can found something you can be interested on http://wiki.openkm.com/index.php/Utilities and I suggest take a look here http://wiki.openkm.com/index.php/Unique_name

I'm not sure if you want to set unique UUID on metadata or also you want to create subfolder structure on document creation. Both things can be done with basic scripting.
 #40258  by janus
 
Hello again!

Might be a bit silly question, but I seem to have a problem generating the docket numbers in the format we usually use, where the different parts are separated by a slash "/". Is it possible to configure the automatic numbering to support the slash as separator?

My other question is, how to implement that directory structure. It would be the best solution, since a single docket number may have several documents under it.

Thx in advance.
 #40265  by jllort
 
Put here your code and we will take a look about the problem with "/". You're not using "/" on folder name no ? because this character is a reserved folder and can not be used as document name or folder name. You can use without problem into the metadata, but not in node names.

There a method to create missing folders:
OKMFolder.getInstance().createMissingFolders(null, "/okm:root/new folder/folder2/folder3");

It will check all the subpaths and if someone not exists will create for you.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.