Hi Dojo,
It is possible with DomInstanceExposers to retrieve all instances where a specific FieldDescriptor contains data? I'm not looking for specific data, it just needs to contain data.
Hi Jens,
It is possible to use the 'KeyExists' exposer to retrieve all DOM instances that have a value for a given FieldDescriptor.
There are however some important notes:
- This will only work efficiently when using Elasticsearch or OpenSearch AND when you are running DataMiner version 10.3.12 and up.
- In any other case, when you use this filter, it will cause all DOM instances to be retrieved from the DB (only those that match any other filter that would be part of the request), which will then be filtered down using the 'KeyExists' condition. If you have a DOM definition that has millions of DOM instances linked, all of them may be read from the DB depending on your other conditions! For STaaS, there is a task already on the backlog of the cloud team to add support for this. (DCP221844)
To conclude, it is possible, but do this with caution. Only use this in cases where you know the amount of DOM instances is limited (<1000) or when you are certain that this won't be run on unsupported systems.
Yes, you can use the ‘Count’ method on DomHelper to know how many records would be retrieved. This is done performantly in the DB. Do note that you should take care when using the ‘KeyExists’ exposer here as well for the same reasons mentioned in the main response.
Hi Thomas, thank you for the detailed answer!
Is there a way that I can know how much DOM instances there are for a certain definition without getting them?