Hi,
I'm extracting data with an ad-hoc data source from a DOM definition that consists of three section definitions.
Currently, I'm using the Read method to retrieve all the data. However, in this scenario, I'm solely concerned with the data into a particular section definition.
var records = GoldenBatchManager.DomHelper.DomInstances.Read(fullFilter);
Is there a way to exclusively retrieve information from just one specific section definition? I understand that a GetFieldValue operation could be performed for the various fields within that specific section definition.
Thanks
Leander,
I have not tested this, but perhaps this filter does what you need:
var filter = DomInstanceExposers.SectionDefinitionIds.Contains(sectionIdGuid)
Please note that the same Sectiondefinition can be used by different DomDefinitions. So your result might provide Instances of different DomDefinitions. This is something you might need to take into account when parsing.
For completeness: DomInstanceExposers requires
using Skyline.DataMiner.Net.Apps.DataMinerObjectModel;
Leander,
Seems like you want a completely new method to ReadSection instead of reading Instances.
It is normal that domHelper.DomInstances.Read will return the full instance reference since you ask to read the Instance.
The filter will make sure that the result is limited to instances that contain the section definition in their Dom definition.
I personally don’t really see a problem in this as you can just get the fields from the section you want.
I do a similar thing in a datasource I created.
Thanks for your response, Mieke.
I’ve implemented the extra filter, but the outcome remains unchanged. It appears that the filter is designed to exclude records that entirely lack that section definition. However, if the section is present, the information retrieved from the record still includes all sections.