• Property group adding with blank values

  • 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.
 #30289  by mohasinmujawar56
 
When we are adding property group and if we left all fields blank then also it the property group is getting added for that particular file or folder. I can show an error if the fields are empty but I am not able to prevent the property group from getting added. Can you please tell me what code to add and in which file it is to be added?
 #30314  by jllort
 
Setting property groups goes with two steps. First add groups ( which adds all fields with blank value ) and second setting properties ( what also could be set blank ).

Take a look at the end of this wiki section about force setting properties, http://wiki.openkm.com/index.php/Form_E ... escription

In you case I suggest think do some report to looking for empty fields ( add group and not set property group case ). Normally this is the right way to solve your problem.
 #30524  by yoan.penchev
 
You have to go to Administration > Metadata > Edit property group. For exaple you could use this code that works for me:
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="Consulting" name="okg:consulting">
    <input label="Name" type="text" name="okp:consulting.name"/>
      <input label="Info" type="text" name="okp:consulting.info"/>
    <input label="Date" type="date" name="okp:consulting.date" />
    <checkbox label="Important" name="okp:consulting.important"/>
    <textarea label="Comment" name="okp:consulting.comment"/>
  </property-group>
  
  <property-group label="Technology" name="okg:technology">
    <select label="Type" name="okp:technology.type" type="multiple">
      <option label="Alfa" value="t1"/>
      <option label="Beta" value="t2" />
      <option label="Omega" value="t3" />
    </select>
    <select label="Language" name="okp:technology.language" type="simple">
      <option label="Java" value="java"/>
      <option label="Python" value="python"/>
      <option label="PHP" value="php" />
    </select>
    <input label="Comment" name="okp:technology.comment"/>
    <textarea label="Description" name="okp:technology.description"/>
    <input label="link" type="link" name="okp:technology.link"/>
  </property-group>
</property-groups>

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.