Relationship between ds_doument and pm_project
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hello everyone,
I'd like to know how ds_document (Document Management) relates to Projects (pm_project), as I need a dashboard that lists documents, filtered by project.
I hope you can help me, thank you.
- Labels:
-
Project Portfolio Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago - last edited 2 hours ago
Hello @DanielIsaiVela
In ServiceNow, ds_document does not usually have a direct out-of-the-box relationship with pm_project unless your implementation has a specific reference field or related configuration connecting them.
The first thing I would check is the dictionary for ds_document and confirm whether there is any reference field pointing to:
pm_project
or possibly to another project-related table, such as:
task
pm_project_task
pm_project
sn_pw_project depending on your implementation/version
If there is no direct reference, the relationship may be indirect, for example through:
- a related list
- a document version table
- attachments
- a custom reference field
- a Document Management configuration
- a parent/task relationship
For the dashboard requirement, you would normally need one of these options:
Direct reference field on ds_document
Example: create/use a field like u_project referencing pm_project, then report on ds_document filtered by that project.
Database View
If the document is related indirectly through another table, create a Database View joining ds_document with the relationship table and pm_project.
Custom relationship table
If one document can be linked to multiple projects, a many-to-many table would be better, such as:
u_project_document
with references to:
pm_project
ds_documentDynamic Interactive Filter
Once the relationship exists, you can create an Interactive Filter for Project and apply it to reports based on the document table or database view.
So, the key point is: the dashboard filter will only work if there is a clear data relationship between the document record and the project record. If the relationship does not exist today, you will need to add one through a reference field, M2M table, or database view depending on your use case.
If this answer helps, please mark it as helpful and confirm that is the best solution.
Regards,
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
There is no field that directly establishes the relationship; only the inherited_access field is set to true, and in the projects they are presented as a related list.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hey @DanielIsaiVela , I will try to guide you.
It’s a common point of confusion with Document Management.
Out-of-the-box, there is no direct, reportable relationship between ds_document and pm_project. What you’re seeing (documents appearing in the Project related list) is typically driven by context and access inheritance (inherited_access), not by a true reference field.
The important distinction here is:
UI relationship does not equal data relationship
Because of that, you won’t be able to reliably build a dashboard filtering documents by project using standard reporting.
So you have few options here...
If your goal is to build a dashboard, you’ll need to establish a queryable relationship.
The most common approaches are:
1. Add a reference field (recommended)
Create a field on ds_document (e.g., u_project → reference to pm_project).
This is the simplest and most reliable way to enable reporting and filtering.
2. Use a relationship table (M2M)
If a document can belong to multiple projects, create a mapping table (e.g., u_project_document) and report from there or via a Database View.
3. Database View (if indirect relationship exists)
If your implementation already links documents indirectly through another table, you can build a Database View to join them.
