• Doubt connect to Database

  • OpenKM tiene muchas características interesantes, pero es necesario un proceso de configuración para mostrar todo su potencial.
OpenKM tiene muchas características interesantes, pero es necesario un proceso de configuración para mostrar todo su potencial.
Forum rules: Por favor, antes de preguntar algo consulta el wiki de documentación o utiliza la función de búsqueda del foro. Recuerda que no tenemos una bola de cristal ni poderes mentales, o sea que que para informar sobre un error es necesario que nos indiques tanto la versión de OpenKM que usas como la del navegador y sistema operativo. Para más información consulta Cómo informar de fallos de forma efectiva.
 #44177  by flakopaisa
 
Good morning, I'm new to Openkm and my English is not good.

I have a database with health entities, this DB is called entidad.

When I am creating the propierty groups I have:
Code: Select all
select $entidad from DatabaseMetadataValue dmv where dmv.table='entidad' and lower(dmv.$entidad) like '%{0}%' order by dmv.$entidad
but when I run the metadata don't appers data.

and when run OKMScanner doesn't run the field entidad.
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="Envios" name="okg:envios">
    <input label="Numero Envio" type="text" name="okp:envios.numero_envio"/>
    <input label="Fecha Envio" type="date" name="okp:envios.fecha_envio" />
   <select label="Quién Radica?" name="okp:envios.persona_radica" type="simple">
      <option label="Lina Murillo" value="Lina Murillo" />
      <option label="Valentina Grisales" value="Valentina Grisales" />
          </select>
          <suggestbox label="Provincia" name="okp:envios.entidad" width="200px"
   table="entidad" dialogTitle="Seleccionar la entidad" filterMinLen="3"
   filterQuery="select $entidad from DatabaseMetadataValue dmv where dmv.table='entidad' and lower(dmv.$entidad) like '%{0}%' order by dmv.$entidad "
   valueQuery=" select $entidad from DatabaseMetadataValue dmv  where dmv_table='entidad' " /> 
  </property-group>
  </property-groups>
 #44190  by jllort
 
Read this section https://docs.openkm.com/kcenter/view/ok ... adatatable

Ensure you have inserted correct values into OKM_DB_METADATA_TYPE and OKM_DB_METADATA_VALUE.
From Database query , you should be able to list the values of this new metadata table definition ( you have three options in the select, jddbc, hibernate and metadata, choose the last ). If all is right from this point of view, check the xml definition again , might be is something wrong.

At least with a quick review in your queries, see that in our samples we select two values ( label and value ) and in your select you are only selecting a single value, that is wrong sure.

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.