cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with custom advanced search

theoryoflinkin
Champ on-the-rise
Champ on-the-rise
Hello,

I'm trying to custom the existing "cm:content" search form by adding some fields.

The fields I want to add ("cm:categories" for searching by categories, "cm:local" for searching by file location and 2 custom fields) are displayed at the screen.

But when I want to test this, the search returns me nothing!

I read a lot of things about some solutions but nothing works for me.

Here is a sample of my share-config-custom.xml




<config evaluator="model-type" condition="cm:content">
      <forms>
          <form id="search">
      
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="mimetype" />
               <show id="cm:modified" />
               <show id="cm:modifier" />
          
                           <!– New fields: the search works well for these –>                
            <show id="cm:created" />
            <show id="cm:creator" />
           
                           <!– New fields: the search does not work at all –>     
            <show id="cm:categories" force="true" />
            <show id="cm:locale" force="true" />              
            <show id="model:folderType" force="true" />
            <show id="model:folderEtat" force="true" />
           
            </field-visibility>
            <appearance>
               <field id="mimetype">
                  <control template="/org/alfresco/components/form/controls/mimetype.ftl" />
               </field>
               <field id="cm:modifier">
                  <control>
                     <control-param name="forceEditable">true</control-param>
                  </control>
               </field>
               <field id="cm:modified">
                  <control template="/org/alfresco/components/form/controls/daterange.ftl" />
               </field>
           
      <field id="cm:created">
                  <control template="/org/alfresco/components/form/controls/daterange.ftl" />
               </field>
      <field id="cm:creator">
                  <control>
                     <control-param name="forceEditable">true</control-param>
                  </control>
               </field>
           
            <field id="cm:categories">
              <control>
                <control-param name="compactMode">true</control-param>
                <control-param name="showSubCategoriesOption">true</control-param>
                </control>
            </field>
             <field id="cm:locale">
                                 <!– custom template: work well –>
             <control template="/org/alfresco/components/form/controls/space.ftl" >
            
             </control>
            </field>        
            <field id="model:folderType">
                                  <control template="/org/alfresco/components/form/controls/number.ftl">
            
              </control>
                           </field>
            <field id="model:folderEtat">
                                  <control template="/org/alfresco/components/form/controls/number.ftl" >
            
              </control>
                           </field>
                    </appearance>
                 </form>
           </forms>
       </config>



Could someone help me, please? (sorry for my english)
6 REPLIES 6

theoryoflinkin
Champ on-the-rise
Champ on-the-rise
Nobody?

Is something not clear in my request?

theoryoflinkin
Champ on-the-rise
Champ on-the-rise
Is there anybody alive in this place?

theoryoflinkin
Champ on-the-rise
Champ on-the-rise
I finally find the solution by myself for the categories search and the custom fields search.

But the location doesn't work at all for the moment

Added my custom properties in metadata, but advanced search is not working showing 0 results found always. Please give me a solution for this error.

angelborroy
Community Manager Community Manager
Community Manager

Thank U so much!!! It's working…