On April 27, 2024, our Sign-in and Create Account options will be unavailable from 9am-12pm ET. During this maintenance window, developer account access and free trial registration will be unavailable.

get all files's id inside a folder

ossa
ossa Ossa nus

i m on D6. what I tried is

1. get the folder object

2. retrieve all its relationships with target role as Relationship.ROLE_CHILD .

3. get the target object's ids.

i thought when i add a parent-child relationship to a document object, a new relationship is also added to the target folder object as well. it seems to be wrong.

does anyone know a good way to solve this problem? if i have to go by query, how would it look like?

-ossa

Tagged:

Comments

  • BTMSoftware
    edited 2008 03 #2

    dm_relation objects are not 'documents' per se, they are not subtypes of dm_sysobject and therefore cannot be linked to a folder.

  • ossa
    ossa Ossa nus
    edited 2008 03 #3

    ok. is there an easy way to get those IDs ?

  • ossa
    ossa Ossa nus
    edited 2008 03 #4

    will this work ? select r_object_id from dm_sysobject ALL where i_folder_id = 'myfolderid'

  • BTMSoftware
    edited 2008 03 #5

    yes you're right about the r_object_id and i_chronicle_id

    Re getting the ID's in the folder, I'm not sure I get it.

    In your relation objects, is the folder ID the Parent or the child ?

    If it's the parent, then for the child ID's, are they the real r_object_id or the i_chonicle_id of the children

    here are a couple of DQL statements you could use

    Case 1: The folder ID is the parent and the child_id is the r_object_id of the children:

    select child_id from dm_relation where relation_name='[whatever relation name you need to get the children for]' AND parent_id='[The folder ID]'

    Case 2: The child_id is actually the i_chronicle_id of the children and the child_label contains the version of the children to be used

    select a.r_object_id,a.relation_name as Relation,b.r_object_id as Par_ID,b.object_name as Parnt,c.i_chronicle_id as Child_Chron_ID,c.object_name as Child,a.child_label as Child_Label,a.description as desciption from dm_relation a, dm_sysobject b, dm_sysobject (all) c where a.parent_id=b.r_object_id and c.i_chronicle_id=a.child_id and any c.r_version_label=a.child_label order by a.r_object_id

    you;ll have to tweak the second one, it is one I use a lot in my own apps

  • ossa
    ossa Ossa nus
    edited 2008 03 #6

    i got it. btw, how to mark this as a good response ?

  • BTMSoftware
    edited 2008 03 #7

    To be honest, I have no idea, I usually answer questions and I didn't ask any since the new EDN interface

    I guess there is somwhere something to mark it a good but wouldn;t know where

  • BTMSoftware
    edited 2008 03 #8

    Actually, since I just posted my 1st question with the new interface, I found out that when creating the discussion, you can mark it as being a question. If you do so, I guess that when you get replies, you can mark them as correct/util, etc... We'll see when I get answers (or should I say IF I get answers)

  • lgrayson
    edited 2008 03 #9

    Here is a DQL if you only have a Folder's Object ID:

    SELECT r_object_id FROM dm_sysobject WHERE FOLDER(ID('insert id here'),DESCEND))

    If you wish to retrieve all versions of the objects, add ALL accordingly.

    When using DQL, I highly suggest getting a hold of the Content Server DQL Reference Manual which can be found on PowerLink. It is a very good book that will answer all of your DQL questions like this one.

    Also I happen to like this handy site written by another Documentum User (Prasad Sombhatta).

    http://askprasad.wordpress.com/documentum/some-useful-dql-tips/

  • ossa
    ossa Ossa nus
    edited 2008 08 #10

    I am writing methods interfacing with customers' document server for my project. My boss didn't manage to get sufficient reference material for me to do my work. In order to have full access to powerlink, i need a license which only my customer has. that is why i have to ask these kind of questions here. Is there anywhere else i can get a copy of the manual you mentioned ?

  • BTMSoftware
    edited 2008 11 #11

    If I understand corretly, your company doesn't own Documentum ?

    I guess if you're developing this for a customer, you could ask the customer to get the doc.

    Obviously, that would also means that officially, you would only be legaly allowed to use his docs on site otherwise, that could become piracy (same goes for the software).

    Maybe that's a point you need to raise with your boss so he gets the stuff in a proper way