<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can we have separate search form for different custom types? in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/can-we-have-separate-search-form-for-different-custom-types/m-p/102712#M29311</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;PRE&gt;&amp;lt;config evaluator="string-compare" condition="AdvancedSearch"&amp;gt; ... 
...
&amp;lt;form labelId="search.form.label.my_custom_Type1" descriptionId="search.form.desc.my_custom_Type1"&amp;gt;my_custom:Type1&amp;lt;/form&amp;gt;
&amp;lt;form labelId="search.form.label.my_custom_Type1" descriptionId="search.form.desc.my_custom_Type1"&amp;gt;my_custom:Type2&amp;lt;/form&amp;gt;
...                
&amp;lt;/config&amp;gt;&lt;/PRE&gt;
&lt;PRE&gt;&amp;lt;config evaluator="model-type" condition="my_custom:Type1"&amp;gt;
        &amp;lt;forms&amp;gt;
            &amp;lt;form&amp;gt; ... &amp;lt;/form&amp;gt;
            &amp;lt;form id="search"&amp;gt; ... &amp;lt;/form&amp;gt;
      &amp;lt;/forms&amp;gt;
&amp;lt;/config&amp;gt;
&amp;lt;config evaluator="model-type" condition="my_custom:Type2"&amp;gt;
        &amp;lt;forms&amp;gt;
            &amp;lt;form&amp;gt; ... &amp;lt;/form&amp;gt;
            &amp;lt;form id="search"&amp;gt; ... &amp;lt;/form&amp;gt;
      &amp;lt;/forms&amp;gt;
&amp;lt;/config&amp;gt;&lt;/PRE&gt;

&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That is correct, you have to include the properties defined in the aspect in each of the form (with id ='search').&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;config evaluator="model-type" condition="my_custom:Type1"&amp;gt;
	&amp;lt;forms&amp;gt;
		&amp;lt;form id="search"&amp;gt;
			&amp;lt;field-visibility&amp;gt;
                             &amp;lt;!-- properties from this type --&amp;gt;
                                ......
                                ....
                                &amp;lt;!-- common properties from the aspect --&amp;gt;
				&amp;lt;show id="my_custom:prop1"
    					force="true"/&amp;gt;
				&amp;lt;show id="my_custom:prop2"
    					force="true"/&amp;gt;
				&amp;lt;show id="my_custom:prop3"
    					force="true"/&amp;gt;
				&amp;lt;show id="my_custom:prop4"
    					force="true"/&amp;gt;
			&amp;lt;/field-visibility&amp;gt;
			.......
			......
		&amp;lt;/form&amp;gt;
	&amp;lt;/forms&amp;gt;
&amp;lt;/config&amp;gt;

&amp;lt;config evaluator="model-type" condition="my_custom:Type2"&amp;gt;
	&amp;lt;forms&amp;gt;
		&amp;lt;form id="search"&amp;gt;
			&amp;lt;field-visibility&amp;gt;
                                &amp;lt;!-- properties from this type --&amp;gt;
                                ......
                                ....
                                &amp;lt;!-- common properties from the aspect --&amp;gt;
				&amp;lt;show id="my_custom:prop1"
    					force="true"/&amp;gt;
				&amp;lt;show id="my_custom:prop2"
    					force="true"/&amp;gt;
				&amp;lt;show id="my_custom:prop3"
    					force="true"/&amp;gt;
				&amp;lt;show id="my_custom:prop4"
    					force="true"/&amp;gt;
			&amp;lt;/field-visibility&amp;gt;
			.......
			......
		&amp;lt;/form&amp;gt;
	&amp;lt;/forms&amp;gt;
&amp;lt;/config&amp;gt;&lt;/PRE&gt;
&lt;P&gt;You can find some examples of &lt;A href="https://docs.alfresco.com/5.2/tasks/forms-config.html" target="_blank" rel="noopener nofollow noreferrer"&gt;configuring form&lt;/A&gt;s here:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/Alfresco/share/blob/develop/share/src/main/resources/alfresco/share-form-config.xml" target="_blank" rel="noopener nofollow noreferrer"&gt;https://github.com/Alfresco/share/blob/develop/share/src/main/resources/alfresco/share-form-config.xml&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Go through this documentation as well:&amp;nbsp;&lt;A href="https://docs.alfresco.com/5.2/references/forms-reference.html" target="_blank" rel="noopener nofollow noreferrer"&gt;https://docs.alfresco.com/5.2/references/forms-reference.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Nov 2020 00:24:58 GMT</pubDate>
    <dc:creator>abhinavmishra14</dc:creator>
    <dc:date>2020-11-06T00:24:58Z</dc:date>
    <item>
      <title>Can we have separate search form for different custom types?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/can-we-have-separate-search-form-for-different-custom-types/m-p/102711#M29310</link>
      <description>&lt;P&gt;There are 3 types. They all have 5 properties in common, then each of them have their own set of properties.&amp;nbsp;&lt;BR /&gt;I have created a base type, with an aspect of the 5 common properties.&lt;BR /&gt;Then 3 different aspects to cover specific properties of the 3 types.&lt;BR /&gt;&lt;BR /&gt;In the share-config-custom.xml, I do not know any means to accomplish different forms for each of these types.&lt;/P&gt;&lt;PRE&gt;&amp;lt;config evaluator="string-compare" condition="AdvancedSearch"&amp;gt; ... 
...
&amp;lt;form labelId="search.form.label.my_custom_Type1" descriptionId="search.form.desc.my_custom_Type1"&amp;gt;my_custom:Type1&amp;lt;/form&amp;gt;
&amp;lt;form labelId="search.form.label.my_custom_Type1" descriptionId="search.form.desc.my_custom_Type1"&amp;gt;my_custom:Type2&amp;lt;/form&amp;gt;
...                
&amp;lt;/config&amp;gt;&lt;/PRE&gt;&lt;P&gt;In this I have given a form entry for each of the types.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Should I create separate search form for each of this type, to accomplish this?&lt;BR /&gt;&lt;STRONG&gt;I never have done this. I would like to confirm.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;config evaluator="model-type" condition="my_custom:Type1"&amp;gt;
        &amp;lt;forms&amp;gt;
            &amp;lt;form&amp;gt; ... &amp;lt;/form&amp;gt;
            &amp;lt;form id="search"&amp;gt; ... &amp;lt;/form&amp;gt;
      &amp;lt;/forms&amp;gt;
&amp;lt;/config&amp;gt;
&amp;lt;config evaluator="model-type" condition="my_custom:Type2"&amp;gt;
        &amp;lt;forms&amp;gt;
            &amp;lt;form&amp;gt; ... &amp;lt;/form&amp;gt;
            &amp;lt;form id="search"&amp;gt; ... &amp;lt;/form&amp;gt;
      &amp;lt;/forms&amp;gt;
&amp;lt;/config&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Nov 2020 00:01:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/can-we-have-separate-search-form-for-different-custom-types/m-p/102711#M29310</guid>
      <dc:creator>sepgs2004</dc:creator>
      <dc:date>2020-11-06T00:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can we have separate search form for different custom types?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/can-we-have-separate-search-form-for-different-custom-types/m-p/102712#M29311</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;PRE&gt;&amp;lt;config evaluator="string-compare" condition="AdvancedSearch"&amp;gt; ... 
...
&amp;lt;form labelId="search.form.label.my_custom_Type1" descriptionId="search.form.desc.my_custom_Type1"&amp;gt;my_custom:Type1&amp;lt;/form&amp;gt;
&amp;lt;form labelId="search.form.label.my_custom_Type1" descriptionId="search.form.desc.my_custom_Type1"&amp;gt;my_custom:Type2&amp;lt;/form&amp;gt;
...                
&amp;lt;/config&amp;gt;&lt;/PRE&gt;
&lt;PRE&gt;&amp;lt;config evaluator="model-type" condition="my_custom:Type1"&amp;gt;
        &amp;lt;forms&amp;gt;
            &amp;lt;form&amp;gt; ... &amp;lt;/form&amp;gt;
            &amp;lt;form id="search"&amp;gt; ... &amp;lt;/form&amp;gt;
      &amp;lt;/forms&amp;gt;
&amp;lt;/config&amp;gt;
&amp;lt;config evaluator="model-type" condition="my_custom:Type2"&amp;gt;
        &amp;lt;forms&amp;gt;
            &amp;lt;form&amp;gt; ... &amp;lt;/form&amp;gt;
            &amp;lt;form id="search"&amp;gt; ... &amp;lt;/form&amp;gt;
      &amp;lt;/forms&amp;gt;
&amp;lt;/config&amp;gt;&lt;/PRE&gt;

&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That is correct, you have to include the properties defined in the aspect in each of the form (with id ='search').&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;config evaluator="model-type" condition="my_custom:Type1"&amp;gt;
	&amp;lt;forms&amp;gt;
		&amp;lt;form id="search"&amp;gt;
			&amp;lt;field-visibility&amp;gt;
                             &amp;lt;!-- properties from this type --&amp;gt;
                                ......
                                ....
                                &amp;lt;!-- common properties from the aspect --&amp;gt;
				&amp;lt;show id="my_custom:prop1"
    					force="true"/&amp;gt;
				&amp;lt;show id="my_custom:prop2"
    					force="true"/&amp;gt;
				&amp;lt;show id="my_custom:prop3"
    					force="true"/&amp;gt;
				&amp;lt;show id="my_custom:prop4"
    					force="true"/&amp;gt;
			&amp;lt;/field-visibility&amp;gt;
			.......
			......
		&amp;lt;/form&amp;gt;
	&amp;lt;/forms&amp;gt;
&amp;lt;/config&amp;gt;

&amp;lt;config evaluator="model-type" condition="my_custom:Type2"&amp;gt;
	&amp;lt;forms&amp;gt;
		&amp;lt;form id="search"&amp;gt;
			&amp;lt;field-visibility&amp;gt;
                                &amp;lt;!-- properties from this type --&amp;gt;
                                ......
                                ....
                                &amp;lt;!-- common properties from the aspect --&amp;gt;
				&amp;lt;show id="my_custom:prop1"
    					force="true"/&amp;gt;
				&amp;lt;show id="my_custom:prop2"
    					force="true"/&amp;gt;
				&amp;lt;show id="my_custom:prop3"
    					force="true"/&amp;gt;
				&amp;lt;show id="my_custom:prop4"
    					force="true"/&amp;gt;
			&amp;lt;/field-visibility&amp;gt;
			.......
			......
		&amp;lt;/form&amp;gt;
	&amp;lt;/forms&amp;gt;
&amp;lt;/config&amp;gt;&lt;/PRE&gt;
&lt;P&gt;You can find some examples of &lt;A href="https://docs.alfresco.com/5.2/tasks/forms-config.html" target="_blank" rel="noopener nofollow noreferrer"&gt;configuring form&lt;/A&gt;s here:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/Alfresco/share/blob/develop/share/src/main/resources/alfresco/share-form-config.xml" target="_blank" rel="noopener nofollow noreferrer"&gt;https://github.com/Alfresco/share/blob/develop/share/src/main/resources/alfresco/share-form-config.xml&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Go through this documentation as well:&amp;nbsp;&lt;A href="https://docs.alfresco.com/5.2/references/forms-reference.html" target="_blank" rel="noopener nofollow noreferrer"&gt;https://docs.alfresco.com/5.2/references/forms-reference.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 00:24:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/can-we-have-separate-search-form-for-different-custom-types/m-p/102712#M29311</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2020-11-06T00:24:58Z</dc:date>
    </item>
  </channel>
</rss>

