<?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: How to replace &amp;quot;+&amp;quot; by &amp;quot;_&amp;quot; in document name with javascript in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-to-replace-quot-quot-by-quot-quot-in-document-name-with/m-p/87784#M26413</link>
    <description>&lt;P&gt;Thank you for you answer,&lt;/P&gt;&lt;P&gt;Can you give me a sample of the javascript please ?&lt;/P&gt;&lt;P&gt;I'm a noob for it...&lt;/P&gt;&lt;P&gt;Here is the rename and move folder, i would like to have a replace for the name if there is a "+" in the props BDCSEDIT.&lt;/P&gt;&lt;PRE&gt;var Descr = document.properties["test:BDC-SEDIT-propriete"];
var libelle =  document.properties["test:BDC-SEDIT-ObjetCommande"];
var tiers =  document.properties["test:BDC-SEDIT-LibelleTiers"];
var parent = document.parent;
var myfolder = parent.childByNamePath(Descr + "_" + tiers + "_" + libelle);
if (myfolder === null) {
    myfolder = parent.createFolder(Descr + "_" + tiers + "_" + libelle);
}
document.move(myfolder);&lt;/PRE&gt;&lt;P&gt;Thank you for your help !&lt;/P&gt;</description>
    <pubDate>Mon, 16 Dec 2019 09:00:46 GMT</pubDate>
    <dc:creator>castelsarrasin</dc:creator>
    <dc:date>2019-12-16T09:00:46Z</dc:date>
    <item>
      <title>How to replace "+" by "_" in document name with javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-replace-quot-quot-by-quot-quot-in-document-name-with/m-p/87782#M26411</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I use alfresco 5.2.0f.&lt;/P&gt;&lt;P&gt;Actually my colleagues use some name with "+" on the document.name&lt;/P&gt;&lt;P&gt;Exemple : XXXX + XXX.pdf&lt;/P&gt;&lt;P&gt;With a javasript i move the file in a folder and the folder get the name ot the filename.&lt;/P&gt;&lt;P&gt;I need to know how i can replace all the "+"&amp;nbsp; by "_" for exemple.&lt;/P&gt;&lt;P&gt;Is someone know how to do ? Is there a javascript to save me from this "+" ?&lt;/P&gt;&lt;P&gt;In the end i want to extend this script for all the shared files.&lt;/P&gt;&lt;P&gt;Thank you by advance for you collaboration.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2019 17:10:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-replace-quot-quot-by-quot-quot-in-document-name-with/m-p/87782#M26411</guid>
      <dc:creator>castelsarrasin</dc:creator>
      <dc:date>2019-12-09T17:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace "+" by "_" in document name with javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-replace-quot-quot-by-quot-quot-in-document-name-with/m-p/87783#M26412</link>
      <description>&lt;P&gt;You can use the replace() function to do this.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 16:06:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-replace-quot-quot-by-quot-quot-in-document-name-with/m-p/87783#M26412</guid>
      <dc:creator>jljwoznica</dc:creator>
      <dc:date>2019-12-10T16:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace "+" by "_" in document name with javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-replace-quot-quot-by-quot-quot-in-document-name-with/m-p/87784#M26413</link>
      <description>&lt;P&gt;Thank you for you answer,&lt;/P&gt;&lt;P&gt;Can you give me a sample of the javascript please ?&lt;/P&gt;&lt;P&gt;I'm a noob for it...&lt;/P&gt;&lt;P&gt;Here is the rename and move folder, i would like to have a replace for the name if there is a "+" in the props BDCSEDIT.&lt;/P&gt;&lt;PRE&gt;var Descr = document.properties["test:BDC-SEDIT-propriete"];
var libelle =  document.properties["test:BDC-SEDIT-ObjetCommande"];
var tiers =  document.properties["test:BDC-SEDIT-LibelleTiers"];
var parent = document.parent;
var myfolder = parent.childByNamePath(Descr + "_" + tiers + "_" + libelle);
if (myfolder === null) {
    myfolder = parent.createFolder(Descr + "_" + tiers + "_" + libelle);
}
document.move(myfolder);&lt;/PRE&gt;&lt;P&gt;Thank you for your help !&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2019 09:00:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-replace-quot-quot-by-quot-quot-in-document-name-with/m-p/87784#M26413</guid>
      <dc:creator>castelsarrasin</dc:creator>
      <dc:date>2019-12-16T09:00:46Z</dc:date>
    </item>
  </channel>
</rss>

