If I create an overview model, based on a CDM (which in turn in rooted in a DM), I have access to all fields of the CDM to show as columns in the Overview.
However, if I want to only have a subset of entries, based on a query model, that query model has to be targeted to the DM and it seems that the consequence is that I cannot select overview columns from the CDM anymore, but am restrictd to the fields from the DM. Is there any way around this?
Hi @jasper-silent-root
Yes, there is a way around it as this is supported by Data Services and the Query API. However, the way around this involves some manual manipulation of json as the modeling tools don’t support this at the moment. The relevant ticket is A12-18236.
Data Services supports loading a restricted set of Fields from a CDM
You can check the full documentation here but the important section is:
Listing Multiple CDDs: In this scenario, the goal is to retrieve multiple root documents and their related documents, typically for overviews or listings. Only a subset of fields from the CDM is needed… For optimal performance, CDMs should be tailored specifically for the overview, containing only the fields relevant for display rather than all fields from the underlying DMs.
however
Such CDMs cannot be created directly in SME, as DM includes are hardwired. Instead, these models must be created manually by editing the CDM annotations in JSON and then opening them in SME, or by manual modification without SME support.
“Modeling”
So the way forwards is to create a CDM with just the Fields that you need by copying and pasting in raw json files. This has a few downsides:
- This is error prone
- The reduced CDM cannot use includes and must explicitly list the fields and groups required
- The CDM is therefore not updated when the base models change.
Example
I created some minimal models with A_DM and B_DM which both have Field1 and Field2. Through manual manipulation of the json it is possible to load just the Field1 data from both documents.
Although I would never recommend manually adjusting json, here’s how I created AWithB_CDM_reduced:
- Model the CDM
AWithB_CDM normally in the SME.
- Copy this to create
AWithB_CDM_reduced in the SME (to ensure the file name and id match).
- Switch to manually updating the json.
- Delete the
"modelReferences" (these define the includes).
- Find the Groups with
"id": "include_<5NumbersOrLetters>" in the "modelRoot" part of the json
- Replace these Groups with the root Group of the respective model
- Delete any unwanted fields or groups
Hi @jasper-silent-root ,
@malcolm-silver-ice was describing how to reduce the amount of data that is to be loaded by the Overview Engine for each line item/row of the overview.
Was your question targeting this aspect or targeting the existence of the rows? So which items should be shown/loaded (instead of how much of this item is to be loaded)
I think what @felix-blazing-river describes fits better? Let me clarify to be sure:
I have a CDM with the fields from the root model (e.g. Field A & B & C) and fields that come from a relationship to another document model (Field D & E). I want to have an overview of all CDMs with columns for Field A, B, D and E, but only show those where Field C is empty.
Since the query model to test for C being empty needs to be targeted to the root document model (and not the CDM), the resulting overview can only show Field A and B of that same document model and not Field D and E from the relationship.
I guess I could add field C to the overview and then add a default filter to that overview to only show those where field C is empty… 
The handling of CDMs in Queries is a bit special, so we decided to delimit it for now from Query Modeling (A12-18326 might address this later. Feel free to set you as watcher and/or trigger.)
With the 2026.06 Release of A12, Overview Engine will allow to reference Fields of to-1-linked Document Models in Columns. If you just want to show the to-1-linked data (no Expression or Computation), I would recommend to use this feature together with a Query. You would then not need a CDM at all.
A workaround in the 2025.06 release line (or if you use Computations or Expressions) could be:
- Model the Query Model based on the root document model.
- Add Filter Definition for the Root Document Model Element
- Model the Overview Model based on the CDM
- edit the json of the Query Model. (set “projectionName”: “cdd” and “targetDocumentModel”: <CDM_Name> ; replace the model id of the modelReferences in the header accordingly. )
- in the SME, switch to the Query Model reference in the Overview Model and select the edited Query Model.
- Ignore the Validation of the Query Model in the SME → you can not deploy all models from the SME anymore.
This however does not allow using a query that could filter across both root DM and relationship DM fields. So a query that covers both Field C and e.g. Field E is not possible. I know I didn’t ask that in the beginning, but it is an actual use case.
Adding some code to implement a default filter setting to certain overviews would allow me to cover both.
You can traverse relationships with the Has()-Operator in Filter Definitions.
So a Filter Definition on the RootDM_DM Document Model Element in Query Model:
[Root/FieldA] == “Test” And
Has(Root_Child_Relationship,”Child”, [Child/FieldC] != ““)
Would result in an overview, that only shows RootDM_DM documents, where the Field FieldA has value “Test“ and that is linked to atleast one Document of the Child Document Model, where the FieldC is not empty.
So in a Database with
| document ID |
FieldA on Root |
Link Status |
Field on Child Document |
| A1 |
FieldA = Test1 |
linked to Child |
FieldC = Test |
|
|
linked to Child |
FieldC = empty |
| A2 |
FieldA = Test |
linked to Child |
FieldC = Test |
|
|
linked to Child |
FieldC = empty |
| A3 |
FieldA = Test |
linked to Child |
FieldC = empty |
| A4 |
FieldA = Test |
not linked to any Child |
|
This would only return A2 and A3.
If you put the second part of the Filter Definition on the Relationship Model Element in the Query, then it would filter the returned links but show A2,A3,A4 in the overview.
I assume that this is not what you try to achieve.