<?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: Custom property with dropdown constraint do not show in edit or search form in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/custom-property-with-dropdown-constraint-do-not-show-in-edit-or/m-p/117710#M32531</link>
    <description>&lt;P&gt;i missed to see this:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;lt;control template="/org/alfresco/components/form/controls/textfield.ftl" /&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;You are creating property for contartint list but using a template for textfield, which may also be causing the issue.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please remove it and let forms framework use default template (selectone.ftl) ?&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note you can not show a property with constraint as a text field.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;It should just be:&lt;/P&gt;
&lt;PRE&gt;&amp;lt;field id="mcus:employeeName" label-id="mcus.employeeName"&amp;gt;&amp;lt;/field&amp;gt;&lt;BR /&gt;&lt;BR /&gt;or&lt;/PRE&gt;
&lt;PRE&gt;&amp;lt;field id="mcus:employeeName" label-id="mcus.employeeName"&amp;gt;
  &amp;lt;control template="/org/alfresco/components/form/controls/selectone.ftl" /&amp;gt;
&amp;lt;/field&amp;gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 01 Dec 2020 21:56:33 GMT</pubDate>
    <dc:creator>abhinavmishra14</dc:creator>
    <dc:date>2020-12-01T21:56:33Z</dc:date>
    <item>
      <title>Custom property with dropdown constraint do not show in edit or search form</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/custom-property-with-dropdown-constraint-do-not-show-in-edit-or/m-p/117706#M32527</link>
      <description>&lt;P&gt;Environment: Community 5.2.x, Alfresco Maven SDK to generate repo and share tier AMP files&lt;BR /&gt;&lt;BR /&gt;In my last project, I had all my properties in a custom aspect, and some properties with associated constraint (list of values). These properties were showing up as a dropdown in the search and edit forms in share.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Now I have the properties directly associated to the type (instead of through aspects). Here, I do not see the &lt;STRONG&gt;&lt;EM&gt;dropdown list&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;(to pick a value from) in the &lt;STRONG&gt;edit&lt;/STRONG&gt; and the &lt;STRONG&gt;search form&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;I am in some misunderstanding I believe. &lt;U&gt;&lt;STRONG&gt;Please note that the field is shown as a regular text field.&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;&lt;BR /&gt;My constraint:&lt;/P&gt;&lt;PRE&gt;&amp;lt;constraints&amp;gt;
   &amp;lt;constraint name="mcus:employeeNamesList" type="LIST"&amp;gt;
      &amp;lt;parameter name="allowedValues"&amp;gt;
      &amp;lt;list&amp;gt;
         &amp;lt;value&amp;gt;&amp;lt;/value&amp;gt;
         &amp;lt;value&amp;gt;Alan G&amp;lt;/value&amp;gt;
         &amp;lt;value&amp;gt;Alex S&amp;lt;/value&amp;gt;
         &amp;lt;value&amp;gt;Barb Sindy&amp;lt;/value&amp;gt;
         &amp;lt;value&amp;gt;Bert Ser&amp;lt;/value&amp;gt;
         ...
      &amp;lt;/list&amp;gt;
     &amp;lt;/parameter&amp;gt;
      &amp;lt;parameter name="caseSensitive"&amp;gt;
         &amp;lt;value&amp;gt;true&amp;lt;/value&amp;gt;
      &amp;lt;/parameter&amp;gt;
      &amp;lt;parameter name="sorted"&amp;gt;
         &amp;lt;value&amp;gt;false&amp;lt;/value&amp;gt;
      &amp;lt;/parameter&amp;gt;
&amp;lt;/constraint&amp;gt;&lt;/PRE&gt;&lt;P&gt;Here is my type (with the property) defined in my model.&lt;/P&gt;&lt;PRE&gt;&amp;lt;type name="mcus:financeReceipts"&amp;gt;
  &amp;lt;title&amp;gt;Financial Receipts&amp;lt;/title&amp;gt;

  &amp;lt;property name="mcus:employeeName"&amp;gt;
  &amp;lt;title&amp;gt;Employee Name&amp;lt;/title&amp;gt;
  &amp;lt;type&amp;gt;d:text&amp;lt;/type&amp;gt;
  &amp;lt;mandatory&amp;gt;false&amp;lt;/mandatory&amp;gt;
  &amp;lt;index enabled="true"&amp;gt;
    &amp;lt;tokenised&amp;gt;both&amp;lt;/tokenised&amp;gt;
  &amp;lt;/index&amp;gt;
  &amp;lt;constraints&amp;gt;
    &amp;lt;constraint ref="mcus:employeeNamesList" /&amp;gt;
  &amp;lt;/constraints&amp;gt; 
&amp;lt;/property&amp;gt;&lt;/PRE&gt;&lt;P&gt;Part of share-config-custom.xml&lt;/P&gt;&lt;PRE&gt;&amp;lt;config evaluator="model-type" condition="mcus:financeReceipts"&amp;gt;
	&amp;lt;forms&amp;gt;
		&amp;lt;!-- Search form --&amp;gt;
		&amp;lt;form id="search"&amp;gt;
			&amp;lt;field-visibility&amp;gt;

				&amp;lt;!--custom--&amp;gt;
				&amp;lt;show id="mcus:employeeName"/&amp;gt;
			&amp;lt;/field-visibility&amp;gt;

			&amp;lt;appearance&amp;gt;

				&amp;lt;!--custom--&amp;gt;
				&amp;lt;field id="mcus:employeeName" label-id="mcus.employeeName"&amp;gt;
				&amp;lt;control template="/org/alfresco/components/form/controls/textfield.ftl" /&amp;gt;
				&amp;lt;/field&amp;gt;
			&amp;lt;/appearance&amp;gt;
		&amp;lt;/form&amp;gt;
	&amp;lt;/forms&amp;gt;
&amp;lt;/config&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Dec 2020 19:16:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/custom-property-with-dropdown-constraint-do-not-show-in-edit-or/m-p/117706#M32527</guid>
      <dc:creator>sepgs2004</dc:creator>
      <dc:date>2020-12-01T19:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: Custom property with dropdown constraint do not show in edit or search form</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/custom-property-with-dropdown-constraint-do-not-show-in-edit-or/m-p/117707#M32528</link>
      <description>&lt;P&gt;It will be displaying property if the property on the form when aspect is applied (considering the property is defined in an aspect and aspect is not mandatory) to the node or property is present on the node (Check node browser using the nodeRef and see if you can see the newly added property).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have a look at share forms documentation shared earlier. It is worth looking at.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if you want the property to display always, you can force it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Update the field definition as:&lt;/P&gt;
&lt;PRE&gt;&amp;lt;show id="mcus:employeeName" force="true"/&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Dec 2020 20:11:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/custom-property-with-dropdown-constraint-do-not-show-in-edit-or/m-p/117707#M32528</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2020-12-01T20:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: Custom property with dropdown constraint do not show in edit or search form</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/custom-property-with-dropdown-constraint-do-not-show-in-edit-or/m-p/117708#M32529</link>
      <description>&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/74498"&gt;@abhinavmishra14&lt;/A&gt;&amp;nbsp;Thx.&lt;BR /&gt;Do you know why the following could occur?&lt;BR /&gt;In Share UI, when you hover over a document, and click "Edit Properties", Employee Name property shows up (still without the drop down). Then there is an "All Properties" edit on the right. When I click that, another form loads up, and it does not show the "Emlpoyee Name" property.&lt;BR /&gt;Could I be missing something?&lt;BR /&gt;In the share-config-custom.xml, I did put this property on the following configurations:&lt;BR /&gt;node-type, form doclib-simple-metadata&lt;BR /&gt;node-type, form doclib-inline-edit&lt;BR /&gt;model-type, form search&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 20:34:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/custom-property-with-dropdown-constraint-do-not-show-in-edit-or/m-p/117708#M32529</guid>
      <dc:creator>sepgs2004</dc:creator>
      <dc:date>2020-12-01T20:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: Custom property with dropdown constraint do not show in edit or search form</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/custom-property-with-dropdown-constraint-do-not-show-in-edit-or/m-p/117709#M32530</link>
      <description>&lt;P&gt;Afer setting forced=true things show up. Crazy!&lt;BR /&gt;Still, I could not get the drop down to appear for the properties that have list constraint&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 21:44:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/custom-property-with-dropdown-constraint-do-not-show-in-edit-or/m-p/117709#M32530</guid>
      <dc:creator>sepgs2004</dc:creator>
      <dc:date>2020-12-01T21:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: Custom property with dropdown constraint do not show in edit or search form</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/custom-property-with-dropdown-constraint-do-not-show-in-edit-or/m-p/117710#M32531</link>
      <description>&lt;P&gt;i missed to see this:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;lt;control template="/org/alfresco/components/form/controls/textfield.ftl" /&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;You are creating property for contartint list but using a template for textfield, which may also be causing the issue.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please remove it and let forms framework use default template (selectone.ftl) ?&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note you can not show a property with constraint as a text field.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;It should just be:&lt;/P&gt;
&lt;PRE&gt;&amp;lt;field id="mcus:employeeName" label-id="mcus.employeeName"&amp;gt;&amp;lt;/field&amp;gt;&lt;BR /&gt;&lt;BR /&gt;or&lt;/PRE&gt;
&lt;PRE&gt;&amp;lt;field id="mcus:employeeName" label-id="mcus.employeeName"&amp;gt;
  &amp;lt;control template="/org/alfresco/components/form/controls/selectone.ftl" /&amp;gt;
&amp;lt;/field&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Dec 2020 21:56:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/custom-property-with-dropdown-constraint-do-not-show-in-edit-or/m-p/117710#M32531</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2020-12-01T21:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: Custom property with dropdown constraint do not show in edit or search form</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/custom-property-with-dropdown-constraint-do-not-show-in-edit-or/m-p/117711#M32532</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;BR /&gt;node-type, form doclib-simple-metadata&lt;BR /&gt;node-type, form doclib-inline-edit&lt;BR /&gt;model-type, form search&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;U&gt;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/24818"&gt;@sepgs2004&lt;/A&gt;&lt;/U&gt;&amp;nbsp; See the differences below.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Types of config evaluators (&amp;lt;config evaluator=”..” condition=”..”&amp;gt;)&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;model-type&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;model-type&lt;/EM&gt; config evaluator is used to define a “create form config” which is used to create custom content/node. We also configure Advance search forms under model-type config evaluator&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;node-type&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;node-type&lt;/EM&gt; config evaluator is used to define a “view/edit form config” which is used to view the metadata or edit the metadata of a node.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;aspect&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;aspect&lt;/EM&gt; config evaluator is also used to define a “view/edit form config” which is used to view the metadata or edit the metadata of a node but this is configured against an aspect. If the aspect is applied to a node then only this form is visible, else it is hidden.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;string-compare&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;string-compare&lt;/EM&gt; config evaluator is used to define config for DocumentLibrary, DocLibActions, DocLibCustom, DocumentLibraryViews, AdvancedSearch, Search, SearchLibCustom, Users, RepositoryLibrary and any custom itemKind (used to load a form pertaining to an action).&lt;/P&gt;
&lt;P&gt;etc....&lt;/P&gt;
&lt;P&gt;Now, when it comes to forms....&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Following are the form Ids:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Default (form&amp;nbsp;element with no&amp;nbsp;id&amp;nbsp;attribute). This is the form displayed when you open the document details. It is also known as “&lt;STRONG&gt;&lt;EM&gt;doclib-common&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt;”&lt;/EM&gt;. It is default form id.&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;A form called&amp;nbsp;&lt;EM&gt;“&lt;STRONG&gt;doclib-simple-metadata&lt;/STRONG&gt;”.&lt;/EM&gt; This is used when you edit properties from the document library, You click on actions menu on each node and select edit properties.&lt;/LI&gt;
&lt;LI&gt;A form called&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;“doclib-inline-edit&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt;”.&lt;/EM&gt; This is used when you click the “Inline Edit” UI action. Valid only for text, html, xml etc. types of content and alfresco by default applied inline editable aspect on these types of nodes to show the action.&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;A form called &lt;EM&gt;“&lt;STRONG&gt;search&lt;/STRONG&gt;”. &lt;/EM&gt;This is used when you select a type to search from Advance search page.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;You choose the evaluator on a condition and decide which form you want to use.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your case, your goal seems to be showing the property on "&lt;EM&gt;&lt;STRONG&gt;doclib-simple-metadata&lt;/STRONG&gt;&lt;/EM&gt;",&amp;nbsp;“&lt;STRONG&gt;&lt;EM&gt;doclib-common&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt;” (default) and "&lt;STRONG&gt;search&lt;/STRONG&gt;".&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Here are examples:&lt;/U&gt;&lt;/P&gt;

&lt;PRE&gt;&amp;lt;config evaluator="model-type" condition="mcus:financeReceipts"&amp;gt;
	&amp;lt;forms&amp;gt;
		&amp;lt;!-- Search form --&amp;gt;
		&amp;lt;form id="search"&amp;gt;
			&amp;lt;field-visibility&amp;gt;
				&amp;lt;!--custom--&amp;gt;
				&amp;lt;show id="mcus:employeeName" force="true"/&amp;gt;
			&amp;lt;/field-visibility&amp;gt;
			&amp;lt;appearance&amp;gt;
				&amp;lt;!--custom--&amp;gt;
				&amp;lt;field id="mcus:employeeName" label-id="mcus.employeeName"/&amp;gt;
			&amp;lt;/appearance&amp;gt;
		&amp;lt;/form&amp;gt;
	&amp;lt;/forms&amp;gt;
&amp;lt;/config&amp;gt;


&amp;lt;config evaluator="node-type" condition="mcus:financeReceipts"&amp;gt;
	&amp;lt;forms&amp;gt;

		&amp;lt;!-- default form, id can be left empty as it will consider 'doclib-common' as default id --&amp;gt;
		&amp;lt;form&amp;gt;
			&amp;lt;field-visibility&amp;gt;
				&amp;lt;!--custom--&amp;gt;
				&amp;lt;show id="mcus:employeeName" force="true"/&amp;gt;
			&amp;lt;/field-visibility&amp;gt;
			&amp;lt;appearance&amp;gt;
				&amp;lt;!--custom--&amp;gt;
				&amp;lt;field id="mcus:employeeName" label-id="mcus.employeeName"/&amp;gt;
			&amp;lt;/appearance&amp;gt;
		&amp;lt;/form&amp;gt;
		
		&amp;lt;form id="doclib-simple-metadata"&amp;gt;
			&amp;lt;field-visibility&amp;gt;
				&amp;lt;!--custom--&amp;gt;
				&amp;lt;show id="mcus:employeeName" force="true"/&amp;gt;
			&amp;lt;/field-visibility&amp;gt;
			&amp;lt;appearance&amp;gt;
				&amp;lt;!--custom--&amp;gt;
				&amp;lt;field id="mcus:employeeName" label-id="mcus.employeeName"/&amp;gt;
			&amp;lt;/appearance&amp;gt;
		&amp;lt;/form&amp;gt;
	&amp;lt;/forms&amp;gt;
&amp;lt;/config&amp;gt;
&lt;/PRE&gt;
&lt;P&gt;I would recommend to go through this whole doc once:&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&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;/U&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 22:12:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/custom-property-with-dropdown-constraint-do-not-show-in-edit-or/m-p/117711#M32532</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2020-12-01T22:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Custom property with dropdown constraint do not show in edit or search form</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/custom-property-with-dropdown-constraint-do-not-show-in-edit-or/m-p/117712#M32533</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/74498"&gt;@abhinavmishra14&lt;/A&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;It will be displaying property if the property on the form when aspect is applied (considering the property is defined in an aspect and aspect is not mandatory) to the node or property is present on the node (Check node browser using the nodeRef and see if you can see the newly added property).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have a look at share forms documentation shared earlier. It is worth looking at.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if you want the property to display always, you can force it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Update the field definition as:&lt;/P&gt;
&lt;PRE&gt;&amp;lt;show id="mcus:employeeName" force="true"/&amp;gt;&lt;/PRE&gt;

&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Glad it worked for you. good luck&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/24818"&gt;@sepgs2004&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 21:15:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/custom-property-with-dropdown-constraint-do-not-show-in-edit-or/m-p/117712#M32533</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2020-12-02T21:15:42Z</dc:date>
    </item>
  </channel>
</rss>

