<?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: Find only sub-folders, not type content in javascript search in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/find-only-sub-folders-not-type-content-in-javascript-search/m-p/89510#M26800</link>
    <description>&lt;P&gt;I deactvated the inherit rules on some of the sub-folders, but the number stays the same.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The option to apply the rule to subfolders is not activated.&lt;/P&gt;</description>
    <pubDate>Thu, 23 Apr 2020 13:24:29 GMT</pubDate>
    <dc:creator>patrickvanhoof</dc:creator>
    <dc:date>2020-04-23T13:24:29Z</dc:date>
    <item>
      <title>Find only sub-folders, not type content in javascript search</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/find-only-sub-folders-not-type-content-in-javascript-search/m-p/89503#M26793</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have following code&lt;/P&gt;&lt;PRE&gt;nodes = search.query({
	language: 'fts-alfresco',
	query: 'ANCESTOR:"workspace://SpacesStore/a0617f12-8eba-4dce-a5b5-59afec623010"+nodeType:"cm:folder"',
	maxItems: 2000
});&lt;/PRE&gt;&lt;P&gt;But this gives me also all documents in all sub-folders. I only want objects of type folder.&lt;/P&gt;&lt;P&gt;All help appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 12:06:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/find-only-sub-folders-not-type-content-in-javascript-search/m-p/89503#M26793</guid>
      <dc:creator>patrickvanhoof</dc:creator>
      <dc:date>2020-04-22T12:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: Find only sub-folders, not type content in javascript search</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/find-only-sub-folders-not-type-content-in-javascript-search/m-p/89504#M26794</link>
      <description>&lt;P&gt;Have tou tried a query like:&lt;/P&gt;&lt;PRE&gt;'ANCESTOR:"workspace://SpacesStore/a0617f12-8eba-4dce-a5b5-59afec623010" AND TYPE:"cm:folder"'&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Apr 2020 15:09:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/find-only-sub-folders-not-type-content-in-javascript-search/m-p/89504#M26794</guid>
      <dc:creator>narkuss</dc:creator>
      <dc:date>2020-04-22T15:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Find only sub-folders, not type content in javascript search</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/find-only-sub-folders-not-type-content-in-javascript-search/m-p/89505#M26795</link>
      <description>&lt;P&gt;Simple as that &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;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 08:10:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/find-only-sub-folders-not-type-content-in-javascript-search/m-p/89505#M26795</guid>
      <dc:creator>patrickvanhoof</dc:creator>
      <dc:date>2020-04-23T08:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: Find only sub-folders, not type content in javascript search</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/find-only-sub-folders-not-type-content-in-javascript-search/m-p/89506#M26796</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;One more question. Why does following code&lt;/P&gt;&lt;PRE&gt;function main() {
	log = "*** Start script ***\n";
	logFile.content += log;
	
	nodes = search.query({
		language: 'fts-alfresco',
		query: 'ANCESTOR:"workspace://SpacesStore/a0617f12-8eba-4dce-a5b5-59afec623010" AND TYPE:"cm:folder"',
		maxItems: 2000
	});

	log = "   -&amp;gt; Gevonden mappen: " + nodes.length + "\n";
	logFile.content += log;

	log = "*** Einde script ***\n";
	logFile.content += log;
}

var logFile = space.childByNamePath("log.txt");
var nodes = null;
if (logFile == null)
{
   logFile = space.createFile("log.txt");
}
var log = "";
main();&lt;/PRE&gt;&lt;P&gt;give me an output that repeats the logging a hundred times? I get in the log output file hundred times the 'Start script', 'Gevonden mappen' and 'Einde script'.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 10:00:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/find-only-sub-folders-not-type-content-in-javascript-search/m-p/89506#M26796</guid>
      <dc:creator>patrickvanhoof</dc:creator>
      <dc:date>2020-04-23T10:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: Find only sub-folders, not type content in javascript search</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/find-only-sub-folders-not-type-content-in-javascript-search/m-p/89507#M26797</link>
      <description>&lt;P&gt;Mmmm maybe you are appending the logs to the file at every script execution, instead of creating new content for the file? If that is not the cause, I don't know what could it be...&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 12:06:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/find-only-sub-folders-not-type-content-in-javascript-search/m-p/89507#M26797</guid>
      <dc:creator>narkuss</dc:creator>
      <dc:date>2020-04-23T12:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: Find only sub-folders, not type content in javascript search</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/find-only-sub-folders-not-type-content-in-javascript-search/m-p/89508#M26798</link>
      <description>&lt;P&gt;I delete the log file before executing the script, so...&lt;/P&gt;&lt;P&gt;The script is executed via a rule on a folder, and&amp;nbsp;it looks like it is executed for each sub-folder in that folder.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 12:25:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/find-only-sub-folders-not-type-content-in-javascript-search/m-p/89508#M26798</guid>
      <dc:creator>patrickvanhoof</dc:creator>
      <dc:date>2020-04-23T12:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: Find only sub-folders, not type content in javascript search</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/find-only-sub-folders-not-type-content-in-javascript-search/m-p/89509#M26799</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Then check that subfolders have the "inherit rules" option deactivated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also, depending on how you want to trigger this rule, take a look at the "apply rule to subfolders" option in rule configuration, to see whether it is well configured.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 13:14:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/find-only-sub-folders-not-type-content-in-javascript-search/m-p/89509#M26799</guid>
      <dc:creator>narkuss</dc:creator>
      <dc:date>2020-04-23T13:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: Find only sub-folders, not type content in javascript search</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/find-only-sub-folders-not-type-content-in-javascript-search/m-p/89510#M26800</link>
      <description>&lt;P&gt;I deactvated the inherit rules on some of the sub-folders, but the number stays the same.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The option to apply the rule to subfolders is not activated.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 13:24:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/find-only-sub-folders-not-type-content-in-javascript-search/m-p/89510#M26800</guid>
      <dc:creator>patrickvanhoof</dc:creator>
      <dc:date>2020-04-23T13:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Find only sub-folders, not type content in javascript search</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/find-only-sub-folders-not-type-content-in-javascript-search/m-p/89511#M26801</link>
      <description>&lt;P&gt;Then I don't know what could it be. It seems the rule is triggering for a lot of nodes. What is your rule configuration, triggers, etc?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 18:59:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/find-only-sub-folders-not-type-content-in-javascript-search/m-p/89511#M26801</guid>
      <dc:creator>narkuss</dc:creator>
      <dc:date>2020-04-23T18:59:51Z</dc:date>
    </item>
    <item>
      <title>Re: Find only sub-folders, not type content in javascript search</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/find-only-sub-folders-not-type-content-in-javascript-search/m-p/89512#M26802</link>
      <description>&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rule definition.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/595i1A1601419C4D97A2/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Nothing special I think. What I think is strange is that it looks like the script executed for each sub-folder.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 06:44:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/find-only-sub-folders-not-type-content-in-javascript-search/m-p/89512#M26802</guid>
      <dc:creator>patrickvanhoof</dc:creator>
      <dc:date>2020-04-24T06:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Find only sub-folders, not type content in javascript search</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/find-only-sub-folders-not-type-content-in-javascript-search/m-p/89513#M26803</link>
      <description>&lt;P&gt;If I activate the rule by triggering it (modify a folder) then it executes only once...&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 09:17:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/find-only-sub-folders-not-type-content-in-javascript-search/m-p/89513#M26803</guid>
      <dc:creator>patrickvanhoof</dc:creator>
      <dc:date>2020-04-30T09:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: Find only sub-folders, not type content in javascript search</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/find-only-sub-folders-not-type-content-in-javascript-search/m-p/89514#M26804</link>
      <description>&lt;P&gt;I contacted Alfresco, the rule running for each sub-folder is 'by design'. If you want it to run only once, you have to trigger it in the folder itself, and not by 'Run rule for this folder'.&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2020 05:42:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/find-only-sub-folders-not-type-content-in-javascript-search/m-p/89514#M26804</guid>
      <dc:creator>patrickvanhoof</dc:creator>
      <dc:date>2020-05-06T05:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: Find only sub-folders, not type content in javascript search</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/find-only-sub-folders-not-type-content-in-javascript-search/m-p/89515#M26805</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/55494"&gt;@patrickvanhoof&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the update.&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2020 09:29:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/find-only-sub-folders-not-type-content-in-javascript-search/m-p/89515#M26805</guid>
      <dc:creator>EddieMay</dc:creator>
      <dc:date>2020-05-06T09:29:35Z</dc:date>
    </item>
  </channel>
</rss>

