<?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: Add a category with a JavaScript rule in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/add-a-category-with-a-javascript-rule/m-p/41175#M22041</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This method could solve the problem, thanks Kevin!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Jul 2006 12:21:01 GMT</pubDate>
    <dc:creator>simon</dc:creator>
    <dc:date>2006-07-17T12:21:01Z</dc:date>
    <item>
      <title>Add a category with a JavaScript rule</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/add-a-category-with-a-javascript-rule/m-p/41173#M22039</link>
      <description>I would like to add a new category to a document using the JavaScript API: add a category "archived" for some documents and move them to an Archive folder (this folder may not exsist and has to be created at that point).This isn't possible with the current JavaScript API or I can't find it in the do</description>
      <pubDate>Fri, 14 Jul 2006 13:48:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/add-a-category-with-a-javascript-rule/m-p/41173#M22039</guid>
      <dc:creator>simon</dc:creator>
      <dc:date>2006-07-14T13:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: Add a category with a JavaScript rule</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/add-a-category-with-a-javascript-rule/m-p/41174#M22040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I would like to add a new category to a document using the JavaScript API: add a category "archived" for some documents and move them to an Archive folder (this folder may not exsist and has to be created at that point).&lt;BR /&gt;&lt;BR /&gt;This isn't possible with the current JavaScript API or I can't find it in the documentation. Is there some other workaround to make this work?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;You are correct there is no direct support for categories in the 1.3 JavaScript API - but since categories are just an aspect and a property applied against a node then it is possible to do.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Categories on a node are stored in a property called "cm:categories" which is applied via the "cm:generalclassifiable" asect and multi-valued of type d:NodeRef. So you could in theory use the JavaScript API to select the category you want (using an XPath or Lucene search to get the category node) and then apply the "cm:generalclassifiable" aspect and set the "cm:categories" property to the selected category node against your destination node. So not simple, but it is possible to do &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kevin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jul 2006 09:23:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/add-a-category-with-a-javascript-rule/m-p/41174#M22040</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2006-07-17T09:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Add a category with a JavaScript rule</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/add-a-category-with-a-javascript-rule/m-p/41175#M22041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This method could solve the problem, thanks Kevin!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jul 2006 12:21:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/add-a-category-with-a-javascript-rule/m-p/41175#M22041</guid>
      <dc:creator>simon</dc:creator>
      <dc:date>2006-07-17T12:21:01Z</dc:date>
    </item>
  </channel>
</rss>

