cancel
Showing results for 
Search instead for 
Did you mean: 

Share, Aspects and Advanced Search

arnieaustin2
Champ in-the-making
Champ in-the-making
After having problems with the examples found in books and via Google, I browsed through this forum.

So, let me get this straight - we have Aspects, and can create custom forms to edit the properties - but we cannot search for content with these properties because for SOME reason, Advance Search cannot do that. What?!

I'm using the Community Edition, version 4.2c.

If I am wrong, then show me how to do it. I added:

<form labelId="aspect.agy_agencyDocument"
   descriptionId="aspect.agy_agencyDocument.search.description">agy:agencyDocument</form>


and it shows up in the menu, but when I select the option, I get:

org.alfresco.repo.forms.FormNotFoundException: 01050034 A form could not be found for item: [type]agy:agencyDocument


My form definition is:


<config evaluator="model-type" condition="agy_agencyDocument">
   <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" />
            <show id="agy:agencyId" />
            <show id="agy:agencyBusinessUnit" />
            <show id="agy:agencyDivision" />
         </field-visibility>
      </form>
      <appearance>
         <field id="cm:description">
            <control template="/org/alfresco/components/form/controls/textfield.ftl" />
         </field>
         <field id="mimetype">
            <control template="/org/alfresco/components/form/controls/mimetype.ftl" />
         </field>
         <field id="cm:modified">
            <control template="/org/alfresco/components/form/controls/daterange.ftl" />
         </field>
         <field id="cm:modifier">
            <control>
               <control-param name="forceEditable">true</control-param>
            </control>
         </field>
         <!– agy:agencyDocument –>
         <field id="agy:agencyId" label-id="agy_agencyCommonModel.type.agy_agencyDocument.title">
            <control template="/org/alfresco/components/form/controls/textfield.ftl" />
         </field>
         <!– agy:agencyBusinessUnit –>
         <field id="agy:agencyBusinessUnit" label-id="agy_agencyCommonModel.property.agy_agencyId.title">
            <control template="/org/alfresco/components/form/controls/textfield.ftl" />
         </field>
         <!– agy:agencyDivision –>
         <field id="agy:agencyDivision" label-id="agy_agencyCommonModel.property.agy_agencyDivision.title">
            <control template="/org/alfresco/components/form/controls/textfield.ftl" />
         </field>
      </appearance>
   </forms>
</config>

12 REPLIES 12

arnieaustin2
Champ in-the-making
Champ in-the-making
Indeed very helpful and insightful, thank you for that. Using what you've said, along with the example included with the Alfresco book Business Solutions, I was able to completely replace the search form for cm:content and add all the potentially available aspect properties to search by.

So far, it is rendering, but none of the fields labels are showing up, even the ones for the field sets. These labels are defined in a registered file and the other forms see them (excepting the field set ids).

What does one have to do to get labels to show up in search?

mitpatoliya
Star Collaborator
Star Collaborator
Thanks Axel for providing the insights and sharing the knowledge.
It is very valuable.

elmarie
Champ in-the-making
Champ in-the-making
Hallo

How can I search on the property Category when using ALFRESCO SHARE.  I would like to just type in a string that I have typed to do the search.
I do not want to use the advanced search as most of my users are very capable of buiding a search string with AND's and OR's.