• OpenKM as records management - selectable author

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
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.
 #13618  by okmuser
 
Hi,

I am using OpenKM as a records management system at home.

When it comes to records management I need to capture all sorts of records, incoming, outgoing, internal and so on.

Unlike in a document management system where the user creates the documents, in the records management system the author can be anyone (internal or external).

Is there a way that I can select the author from a set of pre created users/names to set the actual author of that record fo eg. my "insurance company".

Currently I am trying to assign categories for the authors, but it is not the right solution as well as not sortable.

Please help.

Thanks with regards,
 #13640  by pavila
 
We have on mind implementing Record Management in OpenKM 6.0 but there are little progress actually. For now you can make use of the Property Groups to create a custom metadata where you can store all this info. For the author attribute can use an Input or a Select if you want to restrict the values. If the the elements of the select are dynamic you can try the SuggestBox form element. This is an example:
Code: Select all
<suggestbox label="Author" name="okp:record.author" width="200px"
  table="author" dialogTitle="Select author" filterMinLen="3"
  filterQuery="select $aut_id, $aut_name from DatabaseMetadataValue dmv where dmv.table='author' and dmv.$aut_name like '%{0}%' order by dmv.$aut_name"
  valueQuery="select $aut_id, $aut_name from DatabaseMetadataValue dmv where dmv.table='author' and dmv.$aut_id='{0}'" />
 #13684  by jllort
 
With the pavila suggest you'll be able to perform queries in search view ( is searching document by property / metadata value )
 #13733  by okmuser
 
Pavila, Jllort, thanks for your replies,

I used SELECT form and the result was successful.

Thinking of making some improvement, I am just wondering weather it is possible to use SELECT form to grab data from the database.

My setup is: MySQL database with metadata table and columns contains auth_id, auth_name, auth_email, auth_telephone, auth_address.

When I select the Author (auth_name) through the SELECT form is it possible for me to make the Author field in the (Records property group) metadata to display all of the above information?

Thanks,
 #13767  by okmuser
 
Hi Jllort / Pavila,

When I use the code Pavila provided I am NOT able to input directly on the new PropertyGroup tab (in my case it is 'Author' feild in "Records" property group).

When I click on the database icon next to the Author feild I am able to insert already defined values but not new ones. By this I mean I am not able to insert a new author name which is not already in the database.

I really like the idea of the SuggestBox (as per the attachment) and also I can use one databse for Author and Recipient, but I am unable to sucessfully implement it in OpenKM.

Please help.

Thanks,
Attachments
JSON-Suggest-Box_1.png
JSON-Suggest-Box_1.png (9.27 KiB) Viewed 6412 times
 #13792  by jllort
 
Is not good idea any user administrate database information, that's reason why is not implemented a way to include from UI directly. In your case you should make minimal extension for maintaining the database values from UI, really it's not complicated but needs some time for doing it. For example create a new popup in menu which allows you to add new records. You should use frontend and metadata knowledge for doing it http://wiki.openkm.com/index.php/Extension_Guide and also read developer guide http://wiki.openkm.com/index.php/Developer_Guide
 #13818  by pavila
 
The SuggestBox component read the contents from database, but it is not designed to add new element to the database. I'm not sure if I understand what you mean.
 #13821  by okmuser
 
Thanks Pavilla,

Yes I was not able to insert a new Author in case the author is not already in the database.

But if this is not possible I think that is OK as I can insert the author directly through SQL.

When I use the suggestbox I can't directly type in the author field on the property tab (Property1.jpg), but I have to click on the database icon to get to another dialog box to enter the details (Property2.jpg).

Is it possible to enter the author directly on the Suggestbox space as per in Property1.jpg (the second image below).
Attachments
This is the second dialog pops up when the database icon is clicked
This is the second dialog pops up when the database icon is clicked
property2.jpg (17.63 KiB) Viewed 6388 times
Should be able to insert text directly in the textbox
Should be able to insert text directly in the textbox
property1.jpg (11.54 KiB) Viewed 6388 times
 #13871  by pavila
 
There is no an easy way to change this behaviour. It requires several hours of work and is not planned to make this kind of changes in short or medium term. As usually there are two options:

- Implement yourself (and send us the patch, please)
- Become a costumer (this way we can dedicate resources to this requirement)

Sorry for the inconvenience.
 #13898  by jllort
 
The other problem considering is not all users should be able to maintenance authors table, it should be thinked with patience. The maintenance should be done by some new menu option, seems not much complicated to be implemented.
 #17404  by okmuser
 
Following up on this, I am currently usiing the following configuration for metadata input
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE property-groups PUBLIC "-//OpenKM//DTD Property Groups 2.0//EN"
                                 "http://www.openkm.com/dtd/property-groups-2.0.dtd">
<property-groups>

<property-group label="Document Data" name="okg:datab">

<suggestbox label="Associate 1"  name="okp:datab.associate1" height="50px" width="200px" table="contact" dialogTitle="Associate"
	filterQuery="select $con_id, $con_name from DatabaseMetadataValue dmv where dmv.table='contact' and lower(dmv.$con_name) like '%{0}%' order by dmv.$con_name"
		valueQuery="select $con_id, CONCAT($con_name,',\r ',$con_mail,', ',$con_phone,', ',$con_address,', ',$con_mobile) from DatabaseMetadataValue dmv where dmv.table='contact' and dmv.$con_id='{0}'" />

<suggestbox label="Associate 2"  name="okp:datab.associate2" width="200px" table="contact" dialogTitle="Associate"
        filterQuery="select $con_id, $con_name from DatabaseMetadataValue dmv where dmv.table='contact' and lower(dmv.$con_name) like '%{0}%' order by dmv.$con_name"
                valueQuery="select $con_id, CONCAT($con_name,', ',$con_mail,', ',$con_phone,', ',$con_address,', ',$con_mobile) from DatabaseMetadataValue dmv where dmv.table='contact' and dmv.$con_id='{0}'" />

<suggestbox label="Associate 3"  name="okp:datab.associate3" width="200px" table="contact" dialogTitle="Associate"
        filterQuery="select $con_id, $con_name from DatabaseMetadataValue dmv where dmv.table='contact' and lower(dmv.$con_name) like '%{0}%' order by dmv.$con_name"
                valueQuery="select $con_id, CONCAT($con_name,', ',$con_mail,', ',$con_phone,', ',$con_address,', ',$con_mobile) from DatabaseMetadataValue dmv where dmv.table='contact' and dmv.$con_id='{0}'" />


    <select label="Record Type" width="200px" type="multiple" name="okp:datab.inout">
           <option label="Filing" value="Filing" />
	   <option label="Incoming" value="incoming" />
	   <option label="Outgoing" value="outgoing" />

    </select>

<suggestbox label="Document type" name="okp:datab.type" width="200px" table="type" dialogTitle="Document type"  
        filterQuery="select $typ_id, $typ_name from DatabaseMetadataValue dmv where dmv.table='type' and lower(dmv.$typ_name) like '%{0}%' order by dmv.$typ_name"
                valueQuery="select $typ_id, $typ_name from DatabaseMetadataValue dmv where dmv.table='type' and dmv.$typ_id='{0}'" />


 <input name="okp:datab.date" label="Document Date" type="date"/>

  </property-group>

</property-groups>
Considering this:
Code: Select all
<suggestbox label="Associate 1"  name="okp:datab.associate1" height="50px" width="200px" table="contact" dialogTitle="Associate"
	filterQuery="select $con_id, $con_name from DatabaseMetadataValue dmv where dmv.table='contact' and lower(dmv.$con_name) like '%{0}%' order by dmv.$con_name"
		valueQuery="select $con_id, CONCAT($con_name,',\r ',$con_mail,', ',$con_phone,', ',$con_address,', ',$con_mobile) from DatabaseMetadataValue dmv where dmv.table='contact' and dmv.$con_id='{0}'" />

Is there a way I can get the output from the above suggestbox into a textarea?

Basically I like to get the name, address, and other information in multiline rather than in a single line in suggestbox.

I tried with '\r' and '\n' but didn't work.

Thanks with regards,
OKMUser
 #17424  by jllort
 
Actually you should change FormManager.java class to change Texbox to TextAreA in SuggestBox ( the methods drawFormElement, edit, updateFormElementsValuesWithNewer, need to check more methods on this class but for what you got in mind I think could be enought change it there ).

In future should be better create a new FormElement similar than suggest box to show information like a table or expand suggest box show capabilities, actually in only thinking to work with a select result, not several results and create some table or similar.

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.