get all files's id inside a folder
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
Comments
-
-
will this work ? select r_object_id from dm_sysobject ALL where i_folder_id = 'myfolderid'
-
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
-
-
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)
-
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/
-
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 ?
-
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
Categories
- All Categories
- Cloud Editions
- 1 Thrust Services
- cat as link
- 1 Core SaaS Application development
- 10 Developer Announcements
- 15 General Questions
- 33.4K TeamSite
- 141 Application Governance & Archiving
- 15.2K Designing Analytics Reports
- 1K DevShare Downloads
- Core SaaS Applications
- nested parent
- 4.3K Developing Analytics Applications
- 8.8K Documentum Developer Forum
- Media Management developer
- 159 Transactional Content Processing (TCP)
- 1.7K Web Experience Management
- 55 Tempo Social
- 1 XM Fax