S
By Suhas Das
Author
34 views
In OpenText Documentum, the ID function is used in DQL (Document Query Language) to reference specific objects—such as folders, cabinets, or virtual documents—by their unique identifier.
What is the ID Function?
The ID() function allows you to:
- Identify a specific object in the repository
-
Use its
r_object_id(16-character ID) in queries - Filter content based on its location or structure
Syntax:
ID('object_id')
-
object_id → 16-character unique ID of the object
-
The object must exist in the current repository
ID('object_id')
object_id → 16-character unique ID of the object
Where is ID() Used?
The ID() function is commonly used with:
- FOLDER predicate → Search within a folder
- CABINET predicate → Search within a cabinet
- IN DOCUMENT clause → For virtual documents
- IN ASSEMBLY clause → For assemblies
Example Query
SELECT *
FROM dm_document
WHERE FOLDER (ID('099af3ce800001ff'))
AND title LIKE '%Pond%'
SELECT *
FROM dm_document
WHERE FOLDER (ID('099af3ce800001ff'))
AND title LIKE '%Pond%'
FROM dm_document
WHERE FOLDER (ID('099af3ce800001ff'))
AND title LIKE '%Pond%'
What this does:
-
Searches inside a specific folder
-
Filters documents whose title contains "Pond"
Why Use ID()?
-
Precise targeting → Directly references a specific object
-
Faster queries → Avoids name/path-based lookups
-
Reliable → Object IDs are unique and do not change
Key Points to Remember
-
Uses
r_object_id (not object name or path)
-
Always a 16-character string
-
Works only within the current docbase
-
Common in folder-based and structure-based queries
r_object_id (not object name or path)
Conclusion
The ID() function in Documentum DQL provides a precise and efficient way to query content based on specific repository objects like folders, cabinets, or virtual documents, making it essential for targeted searches.