You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Structure data object from MmsVariableSpecification is diffrent with value when received dataset from rcb
Code:
Debug.WriteLine("\t" + dataObj.name);
// when receiving data from rcb, we receive full dataset so we need index element to retrieve data correctly
List<string> daNames = con.GetDataDirectoryFC(ObjectReference.getElementName(dataObj.name));
for (int ii = 0; ii < daNames.Count; ii++)
{
// only DA with same type FC is add to dataset tree
if (ObjectReference.getFC(daNames[ii]) == ObjectReference.getFC(dataObj.name))
{
string daName = daNames[ii];
string daRef = ObjectReference.getElementName(dataObj.name) + "." + ObjectReference.getElementName(daName);
var daElements = new DataElement(daRef, rcbRef: dsNode.rcbRef, dsNode.rptId, new List<int>(doElement.ElementIndex));
daElements.ElementIndex.Add(ii);
MmsVariableSpecification specification = con.GetVariableSpecification(daRef, ObjectReference.getFC(daName));
Debug.WriteLine("\t\t" + daName + " : " + specification.GetType() + "(" + specification.Size() + ")");
doElement.AddChild(daElements);
if (specification.GetType() == MmsType.MMS_STRUCTURE)
{
for (int iii = 0; iii < specification.Size(); iii++)
{
MmsVariableSpecification elementSpec = specification.GetElement(iii);
string daSpecName = daRef + "." + elementSpec.GetName();
var daSpecElement = new DataElement(daSpecName, dsNode.rcbRef, dsNode.rptId, new List<int>(daElements.ElementIndex));
daSpecElement.ElementIndex.Add(iii);
Debug.WriteLine("\t\t\t" + elementSpec.GetName() + " : " + elementSpec.GetType());
daElements.AddChild(daSpecElement);
if (elementSpec.GetType() == MmsType.MMS_STRUCTURE)
{
for (int iiii = 0; iiii < elementSpec.Size(); iiii++)
{
MmsVariableSpecification elementSpecSpec = elementSpec.GetElement(iiii);
string daSpecSpecName = daSpecName + "." + elementSpecSpec.GetName();
var daSpecSpecElement = new DataElement(daSpecSpecName, dsNode.rcbRef, dsNode.rptId, new List<int>(daSpecElement.ElementIndex));
daSpecSpecElement.ElementIndex.Add(iiii);
Debug.WriteLine("\t\t\t\t" + elementSpecSpec.GetName() + " : " + elementSpecSpec.GetType());
daSpecElement.AddChild(daSpecSpecElement);
}
}
}
}
}
}
The GetDataDirectoryFC function is based on the get-name-list-service. This service returns the result in alphabetic order and not the real order in the data model. Therefore this service is not suitable to determine the order of elements in data set entries.
The GetDataDirectoryFC function is based on the get-name-list-service. This service returns the result in alphabetic order and not the real order in the data model. Therefore this service is not suitable to determine the order of elements in data set entries.
==> Please tell me which service or method I can get the correct order of data set / data object entries
@mzillgith Please, Can you tell me how to get the correct order of Data Attribute name ?
I can not parse data from Dataset - Report because I can not get to the correct order name
Problem:
Structure data object from MmsVariableSpecification is diffrent with value when received dataset from rcb
Code:
Result when read DataObject atrribute names:
=> quality is in position 0
Result when received a rcb:
element 0 included for reason REASON_INTEGRITY {True, 0000000000000, 4/10/2024 8:29:26 AM +00:00} data-ref: BCU_131_T1SP/GGIO110$ST$Ind1
=> quality is in position 1
The text was updated successfully, but these errors were encountered: