Domanda

Can any one please provide a solution in Documentum Query Language to access the folder details of a file checked out from documentum if we provide the object_id of the corresponding file. Thank You.......

È stato utile?

Soluzione

You can try this dql: select * from dm_folder where r_object_id in (select i_folder_id from dm_document where r_object_id = '<objectId>')

Altri suggerimenti

You can simultaneously Dump the object ID in API console.. Command dump,c, You can see hell lot of attributes - more than what DQL can provide you/ Then Search for r_object_id Dump that again and Search for I_folder_path you will get yor oath

You have object id of the document and not the object id of the folder. So first you get the folder id using the object id of the document. The query for this step is:

select i_folder_id from dm_document where r_object_id='<objectid>'

As a result of the above query, youy will get the i_folder_id. It is enough if you just dump this id. You will get information about the folder.

For checked out document you can use -

select * from dm_document where r_lock_owner not like ' '

you can select your r_object_id from the above query result. then for folder details -

select * from dm_folder where r_object_id in (select i_folder_id from dm_document where r_object_id = 'r_object_id')

and if you want the folder path for all checked out documents , you can give like -

select distinct d.r_object_id,d.object_name, f.r_folder_path from dm_folder f,dm_document d where any d.i_folder_id = f.r_object_id and d.r_object_id in <'give r_object_id for checked out documents'> enable (ROW_BASED) 

Relatively new here, but hopefully this is helpful. I have only included the r_folder_path in my select list, but you can include any of the other dm_folder attributes you require.

If you do not have the r_object_id of the document, you can return folder details for all checked out documents using the following DQL -

select      d.r_object_id, 
            d.title, 
            f.r_folder_path
from        dm_document d, dm_folder f
where       d.i_folder_id = f.r_object_id
and         d.r_object_id in 
(
    select      r_object_id
    from        dm_document
    where       r_lock_owner not like ' '
)
and f.r_folder_path not like ' '
enable      (row_based)

select * from dm_folder where r_object_id in (select i_folder_id from dm_document where r_object_id = [given_obj_id]);

You may choose your custom type instead of dm_document, that will limit the results to your desired type.

If you want to know in which folders checked out documents exists, you can get the folderpaths via:

select distinct r_folder_path 
  from dm_folder 
 where r_object_id in
   (select i_folder_id 
      from dm_document
     where r_lock_owner is not nullstring)

Or you can change the last part to: where r_lock_owner = '<name of owner>' and substitute the name in <name of owner>.

select * from dm_sysobject
where r_object_id in (select i_folder_id from dm_sysobject where 
r_object_id='your _object_id')

If you want owner details, type of the folder (if your business has any),its object type and rest other information other than path to the files can be obtained from above query. If you want path then use:

select * from dm_folder
where r_object_id=(select i_folder_id from dm_sysobject where 
r_object_id='your _object_id')
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top