Albert Pinto
Albert Pinto

Reputation: 402

Documentum - getting a list of sub folders

Is there a way in Documentum to get all sub folders of a folder? Can someone suggest a DQL or some thing where I can specify a parent folder and the DQL returns me a folder path of all the sub folders.

Upvotes: 0

Views: 5326

Answers (2)

Milan
Milan

Reputation: 2023

One thing to keep in mind:

Documentum supports linking objects to multiple parent folders. This means that one folder can have multiple parent folders.

If you have a folder structure like this

Cabinet1 
  /Test1 
    /Test3 
  /Test2/
    /Test3

Where Test3 is sub folder of Test1 but also of (as it can be linked to) Test2!

Documentum acomplishes this using repeating attributes. r_folder_path is a repating attribute of dm_folder (actually of dm_sysobject which is it's super type). So, running a DQL :

select distinct r_folder_path from dm_folder where folder('/Folder1/Folder2', descend)

will return all folder paths your folder is part of (linked to):

/Cabinet1/Test1/Test3
/Cabinet1/Test2/Test3

Which might not be what you are looking for!

As DQL does not allow you to specify which repeating attribute value (you can not specify the index of repeating attribute) to be returned there is not elegant ( and fail safe) way to do it in DQL.

What you can do is to fetch all object_name of subfolders and prefix them with folder path of the parent folder you used in search (but that is with some coding).

Check Documentum Content Server System Object Reference guide (it is available on EMC developer community or for now also here)

Upvotes: 1

Albert Pinto
Albert Pinto

Reputation: 402

select distinct r_folder_path from dm_folder where folder('/Folder1/Folder2', descend)

This will return all the folders and subfolders under /Folder1/Folder2

Upvotes: 2

Related Questions