<?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: Target type with specific property in association in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/target-type-with-specific-property-in-association/m-p/308301#M261431</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeff,&lt;/P&gt;&lt;P&gt;Am setting a property with a default value when ever a document being uploaded in a space by applying a rule.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"You can do this on an ad hoc basis by writing a script that performs a search for documents with the property value, then creates the association if it does not exist." can you please help to make the script or showing some sample script&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Oct 2016 11:10:36 GMT</pubDate>
    <dc:creator>prasobhraj</dc:creator>
    <dc:date>2016-10-12T11:10:36Z</dc:date>
    <item>
      <title>Target type with specific property in association</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/target-type-with-specific-property-in-association/m-p/308299#M261429</link>
      <description>Hi,Is it possible make association as target type with specific property? for eg: some type X has a property which is either true or false. I want to associate the type with property value true only. Please advice</description>
      <pubDate>Tue, 30 Aug 2016 07:37:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/target-type-with-specific-property-in-association/m-p/308299#M261429</guid>
      <dc:creator>prasobhraj</dc:creator>
      <dc:date>2016-08-30T07:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Target type with specific property in association</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/target-type-with-specific-property-in-association/m-p/308300#M261430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It sounds like you want to create an association between two objects if and only if the property on one of the objects has a certain value. You can do this on an ad hoc basis by writing a script that performs a search for documents with the property value, then creates the association if it does not exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to do this every time a document is created, you can write a behavior to check the property value, then create the association.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Sep 2016 19:46:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/target-type-with-specific-property-in-association/m-p/308300#M261430</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2016-09-07T19:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: Target type with specific property in association</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/target-type-with-specific-property-in-association/m-p/308301#M261431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeff,&lt;/P&gt;&lt;P&gt;Am setting a property with a default value when ever a document being uploaded in a space by applying a rule.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"You can do this on an ad hoc basis by writing a script that performs a search for documents with the property value, then creates the association if it does not exist." can you please help to make the script or showing some sample script&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2016 11:10:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/target-type-with-specific-property-in-association/m-p/308301#M261431</guid>
      <dc:creator>prasobhraj</dc:creator>
      <dc:date>2016-10-12T11:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: Target type with specific property in association</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/target-type-with-specific-property-in-association/m-p/308302#M261432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would be far more instructive for you to give it a shot and then report back if you get stuck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get you started, here is a JavaScript snippet that does a search:&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14762804721845687 jive_text_macro" data-hasrefreshed="true" data-renderedposition="85.85000610351562_8_1332_96" jivemacro_uid="_14762804721845687" modifiedtitle="true"&gt;&lt;P&gt;var query = "+TYPE:\"cm:folder\" +@cm\\:name:\"" + PARENT_FOLDER_NAME + "\"";&lt;/P&gt;&lt;P&gt;var results = search.luceneSearch(query);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (results.length != 1) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; logger.log("Expected to find exactly one folder named " + PARENT_FOLDER_NAME + " but instead found " + results.length);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may also want to install the JavaScript console. It can be used as a nice little JavaScript testing Ui directly within Alfresco Share:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/share-extras/js-console" title="https://github.com/share-extras/js-console" rel="nofollow noopener noreferrer"&gt;GitHub - share-extras/js-console: Administration Console component for Alfresco Share, that enables the execution of arb…&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And here are some docs:&lt;/P&gt;&lt;P&gt;&lt;A href="http://docs.alfresco.com/5.0/references/API-JS-Search.html" title="http://docs.alfresco.com/5.0/references/API-JS-Search.html" rel="nofollow noopener noreferrer"&gt;Search API | Alfresco Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://docs.alfresco.com/5.0/references/API-JS-ModifyCreate.html" title="http://docs.alfresco.com/5.0/references/API-JS-ModifyCreate.html" rel="nofollow noopener noreferrer"&gt;Modifying and creating API | Alfresco Documentation&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2016 13:58:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/target-type-with-specific-property-in-association/m-p/308302#M261432</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2016-10-12T13:58:14Z</dc:date>
    </item>
  </channel>
</rss>

