Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
This is my xml file
--------------------------------------------------------------------------------------------------------------
This is my code -
var xmlDocument= me.XMLReceivedMessage;
// create info table from data shape
var params = {
infoTableName : "infoTable",
dataShapeName : "US_NRV_Factory_Dash_QULIS_DataShape"
};
// CreateInfoTableFromDataShape(infoTableName:STRING("InfoTable"), dataShapeName:STRING):INFOTABLE(xmlParserTable)
var infoTable = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params);
// iterate through xml and add to info table
for each (var tag in xmlDocument.DataArea.QualityDeviationRemark) {
var newRow = Object();
newRow.ChassisNumber = tag.DataArea.QualityDeviationRemark.ChassisNo;
newRow.CreationDateTime = tag.DataArea.QualityDeviationRemark.CreationDateTime;
newRow.ProblemType = tag.DataArea.QualityDeviationRemark.ProblemType;
newRow.ProblemDetails = tag.DataArea.QualityDeviationRemark.ProblemDetails;
newRow.ReportingArea = tag.DataArea.QualityDeviationRemark.ReportingArea;
infoTable.AddRow(newRow);
}
// return info table
var result = infoTable;
Can someone please help me. It says no data each time I execute.
What's your intention:
- Do you need to read the data from the file
or
- Do you need your program to work.
In the first case: Use MsExcel to open the file. It reports that some schema's are missing, and offers to create them for you, then you get results.
In the second case: Make sure you get access to Volvo's schema's....
Success!
Luc
Sorry I changed my xml file. I updated the new one. I am able to access the xml file.
When I do this newRow.ChassisNumber = tag.DataArea.QualityDeviationRemark.ChassisNo;
I do not get the data though. It gives me a infotable saying no data as output
That's not a direct answer to my question...
And your 'updated xml file' is NOT a valid xml file, apart from the fact that it's a picture of file contents.
Here's a picture of (part of the) structure and data of your original file:
(Start at the top right).
Hi @sk36
Can you please confirm which PTC product you are referring to so that I can move your post to the appropriate support forum?
Thanks!
Leigh