<?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: Smart Folder template and multivalued property in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/smart-folder-template-and-multivalued-property/m-p/136060#M36563</link>
    <description>&lt;P&gt;There is no way to modify JSON template using Java OpenCMIS library or Alfresco API?&lt;/P&gt;&lt;P&gt;I could edit the template by an external Java code and automatically add new node..&lt;/P&gt;&lt;P&gt;Thank for the reply.&lt;/P&gt;</description>
    <pubDate>Fri, 09 Apr 2021 07:25:02 GMT</pubDate>
    <dc:creator>Lvit</dc:creator>
    <dc:date>2021-04-09T07:25:02Z</dc:date>
    <item>
      <title>Smart Folder template and multivalued property</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/smart-folder-template-and-multivalued-property/m-p/136058#M36561</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i have a custom model with a multiple value property like this:&lt;/P&gt;&lt;PRE&gt;&amp;lt;property name="mytype:myprop"&amp;gt;
                    &amp;lt;title&amp;gt;MyProp&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;multiple&amp;gt;true&amp;lt;/multiple&amp;gt;
                    &amp;lt;index enabled="true"&amp;gt;
                        &amp;lt;tokenised&amp;gt;TRUE&amp;lt;/tokenised&amp;gt;
                        &amp;lt;facetable&amp;gt;false&amp;lt;/facetable&amp;gt;
                    &amp;lt;/index&amp;gt;
                &amp;lt;/property&amp;gt;&lt;/PRE&gt;&lt;P&gt;This property is filled by external Java code and the values is different for every documents. For example:&lt;/P&gt;&lt;P&gt;DOC1 --&amp;gt; ["VAL1", "VAL2", "VAL3"]&lt;/P&gt;&lt;P&gt;DOC2 --&amp;gt; ["VAL2", "VAL4", "VAL5", "VAL6"]&lt;/P&gt;&lt;P&gt;I created a simple smart folder template that create two subfolders for two single possible values of property:&lt;/P&gt;&lt;PRE&gt;{
	"name" : "Smart Folders Template",
	"nodes" : [{
		"id":"1",
		"name" : "Values",
		"description" : "Values",
		"nodes" : [{
				"id":"11",
				"name":"VAL1",
				"description":"VAL1",
				"search" : {
					"language" : "fts-alfresco",
					"query" : "(PATH:'/mypath//*') AND (=cm:content.mimetype:application/pdf) AND (=mytype:myprop:'VAL1')"
				}
			},
			{
				"id":"12",
				"name":"VAL2",
				"description":"VAL2",
				"search" : {
					"language" : "fts-alfresco",
					"query" : "(PATH:'/mypath//*') AND (=cm:content.mimetype:application/pdf) AND (=mytype:myprop:'VAL2')"
				}
			}
		]
	}
}&lt;/PRE&gt;&lt;P&gt;But this property has lot of possible values, and increase every day.&lt;/P&gt;&lt;P&gt;I want to have a smart folder template that automatically create a subfolders for every possible value of this property.&lt;/P&gt;&lt;P&gt;How can i do?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 10:00:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/smart-folder-template-and-multivalued-property/m-p/136058#M36561</guid>
      <dc:creator>Lvit</dc:creator>
      <dc:date>2021-04-08T10:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: Smart Folder template and multivalued property</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/smart-folder-template-and-multivalued-property/m-p/136059#M36562</link>
      <description>&lt;P&gt;You would have to develop a custom behaviour / policy which reacts to any property update on nodes on which the propery can be set. This behavior / policy would have to parse your smart folder template JSON, check if the value(s) of the multivalued property are already contained in there, and if not, modify the JSON and save it back to the template node.&lt;/P&gt;
&lt;P&gt;Apart from such custom logic, there is no way (no configuration / dynamic templating in the JSON) to achieve this.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 15:33:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/smart-folder-template-and-multivalued-property/m-p/136059#M36562</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2021-04-08T15:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: Smart Folder template and multivalued property</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/smart-folder-template-and-multivalued-property/m-p/136060#M36563</link>
      <description>&lt;P&gt;There is no way to modify JSON template using Java OpenCMIS library or Alfresco API?&lt;/P&gt;&lt;P&gt;I could edit the template by an external Java code and automatically add new node..&lt;/P&gt;&lt;P&gt;Thank for the reply.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 07:25:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/smart-folder-template-and-multivalued-property/m-p/136060#M36563</guid>
      <dc:creator>Lvit</dc:creator>
      <dc:date>2021-04-09T07:25:02Z</dc:date>
    </item>
  </channel>
</rss>

