AnsweredAssumed Answered

Is it possible to have Associations in Advanced Search?

Question asked by vicsaego on Aug 6, 2008
Latest reply on Aug 19, 2008 by pmonks
Hi everyone,

I've created custom properties en stContext.xml like this:

       <type name="st:offert">
         <title>esistel</title>
         <parent>cm:content</parent>
         <properties>         
             <property name="st:codOffert">
               <type>d:text</type>
            </property>
        </properties>   
           <associations>
            <association name="st:associatedOfferts">           
               <source>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </source>              
               <target>
                  <class>st:offert</class>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </target>              
            </association>
          
         </associations>

and I would like to have this associations in advanced search. Mi objetive is to have the possibility to find a document searching by associated offerts? For example, a document has a code (codOffert) of OE_321, but this document may be associated with one, two o more documents having codes like OE_567, OE603, OE_647. Is it possible to search this document whith codOffert OE_321?  Of course, when a user upload a document introduces a list of codes of documents which the original document is associated whith.

I have tried to do this with this piece of code in web-client-config-custom.xml:

   <config evaluator="string-compare" condition="Advanced Search">
      <advanced-search>
         <content-types>           
            <type name="st:offert" />
         </content-types>
         <custom-properties> 
            <!–<meta-data type="st:offert" property="st:associatedOfferts" display-label="idAssociated" /> –>
            <show-association name="st:associatedOfferts" display-label="idAssociated" />
         </custom-properties>
      </advanced-search>
   </config>

Thansk very much in advance.

Outcomes