AnsweredAssumed Answered

Properties in advanced search duplicated

Question asked by jlabuelo on Mar 18, 2015
Latest reply on Mar 23, 2015 by jlabuelo
Hi all

I am creating an specific custom advaced search screen in order to allow users to search only by properties of a specific type of document. Lets say we have a document Type call contrats, with properties "ownder, date, id, status". I want to be able to configure web-client-config-custom.xml in order to allow users to search only for documents "contracts" and their properties.

To do so, I have modified the web-client-config-custom.xml file adding this code


<config evaluator="string-compare" condition="Advanced Search EmCon">
                <advanced-search>
                        <content-types>
                                <type name="emcon:ContratosEmitidos" />
                        </content-types>
                        <custom-properties>
                                <meta-data type="emcon:ContratosEmitidos" property="emcon:date" />
                                <meta-data type="emcon:ContratosEmitidos" property="emcon:fecha_caducidad" />
                                <meta-data type="emcon:ContratosEmitidos" property="emcon:estado" />
                                <meta-data type="emcon:ContratosEmitidos" property="emcon:cif" />
                                <meta-data type="emcon:ContratosEmitidos" property="emcon:dni" />
                                <meta-data type="emcon:ContratosEmitidos" property="emcon:email" />
                        </custom-properties>
                </advanced-search>
        </config>




And the Type it is being defined in the EmComMNodel.xml file this way


<type name="emcon:ContratosEmitidos">
              <title>Contratos Emitidos</title>
              <parent>cm:content</parent>
              <properties>
                         <property name="emcon:fecha_contrato">
                           <title>Fecha emisión contrato</title>
                           <type>d:date</type>
                           <mandatory>true</mandatory>
                 </property>
                  <property name="emcon:fecha_caducidad">
                           <title>Fecha caducidad contrato</title>
                           <type>d:date</type>
                           <mandatory>true</mandatory>
                 </property>
                  <property name="emcon:estado">
                           <title>Estado Contrato</title>
                           <type>d:text</type>
                           <constraints>
                                        <constraint ref="emcon:valoresEstado"/>
                                </constraints>
                 </property>
                         <property name="emcon:cif">
                           <title>CIF</title>
                           <type>d:text</type>
                           <mandatory>true</mandatory>
                           <multiple>true</multiple>
                 </property>
                          <property name="emcon:dni">
                           <title>DNI</title>
                           <type>d:text</type>
                           <mandatory>true</mandatory>
                           <multiple>true</multiple>
                 </property>
                           <property name="emcon:email">
                           <title>Correo Electronico</title>
                           <type>d:text</type>
                           <mandatory>true</mandatory>
                           <multiple>true</multiple>
                 </property>
                         <property name="emcon:propietario">
                           <title>CIF Propietario</title>
                           <type>d:text</type>
                           <mandatory>true</mandatory>
                 </property>
                   </properties>
           </type>
        </types>




However when I go to the Advanced Search Screen, I see the properties twice, and only one set works (green box in screenshot attached)

How can I solve this situation?

Thanks a lot

Attachments

Outcomes