AnsweredAssumed Answered

Advanced search of custom properties

Question asked by trelp on Oct 22, 2012
Hi all,

I created two new metadata fields in Alfresco 3.4.d but I these fields are not shown in advanced search. I guess something is missing but I don't know what.

I have the files:
1. custom-model.xml:
<?xml version="1.0" encoding="UTF-8"?>
<model name="sample:model" xmlns="http://www.alfresco.org/model/dictionary/1.0">

    <!– Optional meta-data about the model –>
    <description>Modelo Personalizado</description>
    <author>Francesc Arbó</author>
    <version>1.0</version>

    <!– Imports are required to allow references to definitions in other models –>
    <imports>
        <!– Import Alfresco Dictionary Definitions –>
        <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
        <!– Import Alfresco Content Domain Model Definitions –>
        <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
    </imports>

    <!– New namespaces defined by this model –>
    <namespaces>
        <namespace uri="sample.model" prefix="sample" />
    </namespaces>

    <constraints>
    </constraints>

    <types>
    </types>

    <aspects>
        <aspect name="sample:temporal">
            <title>Tipos Personalizados</title>
            <properties>
                <property name="sample:Confidencialidad">
                    <type>d:text</type>
                    <constraints>
                        <constraint type="LIST">
                            <parameter name="allowedValues"><list><value>Private</value><value>Public</value><value>Restricted</value></list></parameter>
                        </constraint>
                    </constraints>
                </property>
                <property name="sample:TipoFichero">
                    <type>d:text</type>
                    <constraints>
                        <constraint type="LIST">
                            <parameter name="allowedValues"><list><value>Analysis</value><value>Design</value><value>ETC/ProjEval</value><value>Inventory</value><value>Manual</value><value>Meeting Minutes</value><value>Plan</value><value>Presentation</value><value>Project-Center Management</value><value>Project Management Rules</value><value>Proposal</value><value>Report</value><value>Starter Pack</value><value>Strategy</value><value>Support Info</value><value>Technical Documentation</value></list></parameter>
                        </constraint>
                    </constraints>
                </property>
            </properties>
        </aspect>
    </aspects>
</model>

2. web-client-config-custom.xml:
<alfresco-config>
    <config evaluator="string-compare" condition="Action Wizards">
        <aspects>
            <aspect name="sample:temporal" />
        </aspects>
    </config>

    <config evaluator="aspect-name" condition="sample:temporal">
        <property-sheet>
            <show-property name="sample:Confidencialidad" display-label-id="Confidencialidad"/>
            <show-property name="sample:TipoFichero" display-label-id="TipoFichero"/>
        </property-sheet>
    </config>

<config evaluator="string-compare" condition="Advanced Search">
   <advanced-search>
      <content-types>
         <type name="sample:search" />
      </content-types>
      <folder-types>
      </folder-types>
      <custom-properties>
         <meta-data type="d:text" property="sample:Confidencialidad" />
         <meta-data aspect="d:text" property="sample:TipoFichero" />
      </custom-properties>
   </advanced-search>
</config>


</alfresco-config>

3. webclient.properties:
Confidencialidad=Confidencialidad
TipoFichero=Tipo de fichero

I guess I have to add something about the advanced search in the web-client-config-custom.xml file but I don't know what. I've read the alfresco wiki and I looked for an answer in google but I'm still not able to solve it.

Outcomes