Page 1 of 1

OpenKM as records management - selectable author

PostPosted:Mon Jan 23, 2012 11:01 pm
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,

Re: OpenKM as records management - selectable author

PostPosted:Tue Jan 24, 2012 5:34 pm
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}'" />

Re: OpenKM as records management - selectable author

PostPosted:Thu Jan 26, 2012 8:37 am
by okmuser
By this is it possible to search say for a document from a particular author?

Thanks,

Re: OpenKM as records management - selectable author

PostPosted:Sat Jan 28, 2012 9:09 am
by jllort
With the pavila suggest you'll be able to perform queries in search view ( is searching document by property / metadata value )

Re: OpenKM as records management - selectable author

PostPosted:Wed Feb 01, 2012 12:41 pm
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,

Re: OpenKM as records management - selectable author

PostPosted:Thu Feb 02, 2012 9:35 am
by jllort
Yes, as explain pavila with suggestbox you can display this extra column information in metadata field.

Re: OpenKM as records management - selectable author

PostPosted:Fri Feb 03, 2012 6:11 am
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,

Re: OpenKM as records management - selectable author

PostPosted:Sun Feb 05, 2012 9:06 am
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

Re: OpenKM as records management - selectable author

PostPosted:Tue Feb 07, 2012 7:28 am
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.

Re: OpenKM as records management - selectable author

PostPosted:Tue Feb 07, 2012 8:33 am
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).

Re: OpenKM as records management - selectable author

PostPosted:Wed Feb 08, 2012 5:16 pm
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.

Re: OpenKM as records management - selectable author

PostPosted:Fri Feb 10, 2012 6:40 am
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.

Re: OpenKM as records management - selectable author

PostPosted:Thu Aug 09, 2012 12:50 am
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

Re: OpenKM as records management - selectable author

PostPosted:Sat Aug 11, 2012 3:34 pm
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.