cancel
Showing results for 
Search instead for 
Did you mean: 

getChildByName method

anakin98000
Champ on-the-rise
Champ on-the-rise

Hi,

I would like to check if a node contains a child with specific name.

I try with 

alfrescoApiService.nodesApi.getNodeChildren(node)

but I don't know how to add the name  of the child

and I try 

that.alfrescoApiService.searchApi.search(filterRequest)

but I don't know how to add the node Id of the parent in filterRequest

Is it possible to reproduce java method getChildByName with ADF ?

Thank's

1 ACCEPTED ANSWER

EddieMay
World-Class Innovator
World-Class Innovator

Hi @anakin98000 

NodesAPI doesn't support this - instead you'll need to use the searchAPI - see here.

HTH,

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

View answer in original post

2 REPLIES 2

EddieMay
World-Class Innovator
World-Class Innovator

Hi @anakin98000 

NodesAPI doesn't support this - instead you'll need to use the searchAPI - see here.

HTH,

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

sanjaybandhniya
Elite Collaborator
Elite Collaborator

You can use SearchService in ADF.

Ex.

              const defaultQueryBody: QueryBody = {
                  query: {
                    "query":"PATH:\"app:company_home/st:sites/cm:demo/cm:documentLibrary/cm:Test/cm:folder1//*\" AND cm:name:\"Letter.pdf*\""
                  }
              };
               this.searchService.searchByQueryBody(defaultQueryBody).subscribe(res=>{
                console.log(res);
               });