cancel
Showing results for 
Search instead for 
Did you mean: 

Find only sub-folders, not type content in javascript search

patrickvanhoof
Confirmed Champ
Confirmed Champ

Hi,

I have following code

nodes = search.query({
	language: 'fts-alfresco',
	query: 'ANCESTOR:"workspace://SpacesStore/a0617f12-8eba-4dce-a5b5-59afec623010"+nodeType:"cm:folder"',
	maxItems: 2000
});

But this gives me also all documents in all sub-folders. I only want objects of type folder.

All help appreciated.

1 ACCEPTED ANSWER

narkuss
Star Contributor
Star Contributor

Have tou tried a query like:

'ANCESTOR:"workspace://SpacesStore/a0617f12-8eba-4dce-a5b5-59afec623010" AND TYPE:"cm:folder"'

View answer in original post

12 REPLIES 12

If I activate the rule by triggering it (modify a folder) then it executes only once...

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'.

EddieMay
World-Class Innovator
World-Class Innovator

Hi @patrickvanhoof 

Thanks for the update.

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!