<?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 labels through javascript in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/add-labels-through-javascript/m-p/56320#M20432</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One more question: assume we are going for a rule on a folder that adds a specific label to the files loaded in that folder, which javascript command is used to add that label to a document? Is it someting like node.addLabel(labelname)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Mar 2018 15:21:49 GMT</pubDate>
    <dc:creator>patrickvanhoof</dc:creator>
    <dc:date>2018-03-13T15:21:49Z</dc:date>
    <item>
      <title>Add labels through javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/add-labels-through-javascript/m-p/56317#M20429</link>
      <description>I have following situation: a whole lot of files and folders are now stored on a drive. We want to migrate those to Alfresco, and add the same time add the correct labels. Problem is that labels can not be assigned based on the folder structure, so a rule is no option.What I think should be possible</description>
      <pubDate>Fri, 02 Mar 2018 12:32:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/add-labels-through-javascript/m-p/56317#M20429</guid>
      <dc:creator>patrickvanhoof</dc:creator>
      <dc:date>2018-03-02T12:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Add labels through javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/add-labels-through-javascript/m-p/56318#M20430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming you have a directory structure on a fileserver, want to import the whole structure and add metadata based on the Path of the imported documents, you have several optinons:&lt;/P&gt;&lt;P&gt;- copy it over on the alfresco servers filesystem, create metadata xml files and use the bulk importer&amp;nbsp;&lt;A class="link-titled" href="https://docs.alfresco.com/5.2/concepts/Bulk-Import-Tool.html" title="https://docs.alfresco.com/5.2/concepts/Bulk-Import-Tool.html" rel="nofollow noopener noreferrer"&gt;Using the Bulk Import tool | Alfresco Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- copy it to alfresco by webDav and use a rule to add the metadata. You can trigger a javascript by rule "onCreate" in a folder and all it subfolders. In your script, make sure the triggering object is a file (document.isDocument) and extract the data from document.displayPath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Mar 2018 17:59:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/add-labels-through-javascript/m-p/56318#M20430</guid>
      <dc:creator>mehe</dc:creator>
      <dc:date>2018-03-02T17:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: Add labels through javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/add-labels-through-javascript/m-p/56319#M20431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'll have a look at the metadata xml and bulk import.&lt;/P&gt;&lt;P&gt;A rule is not possible, the place of the files in the structure does not determine the labels. So we somehow have to add the labels via another way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2018 08:35:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/add-labels-through-javascript/m-p/56319#M20431</guid>
      <dc:creator>patrickvanhoof</dc:creator>
      <dc:date>2018-03-05T08:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: Add labels through javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/add-labels-through-javascript/m-p/56320#M20432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One more question: assume we are going for a rule on a folder that adds a specific label to the files loaded in that folder, which javascript command is used to add that label to a document? Is it someting like node.addLabel(labelname)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2018 15:21:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/add-labels-through-javascript/m-p/56320#M20432</guid>
      <dc:creator>patrickvanhoof</dc:creator>
      <dc:date>2018-03-13T15:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Add labels through javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/add-labels-through-javascript/m-p/56321#M20433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you are talking about "tags". You can add these tags - that show up as a kind of "labels" in alfresco share using node.addTag(Tarnname) - you were quite close:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://docs.alfresco.com/community/references/API-JS-ScriptNode-Tagging.html" title="https://docs.alfresco.com/community/references/API-JS-ScriptNode-Tagging.html" rel="nofollow noopener noreferrer"&gt;Tagging API | Alfresco Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2018 18:38:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/add-labels-through-javascript/m-p/56321#M20433</guid>
      <dc:creator>mehe</dc:creator>
      <dc:date>2018-03-13T18:38:06Z</dc:date>
    </item>
  </channel>
</rss>

