cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Is it possible to push an empty child info table to a field in parent info table?

MC_9885914
2-Explorer

Is it possible to push an empty child info table to a field in parent info table?

I'm trying to push an empty child infotable to a field (of basetype : infotable) in parent infotable

 

var InvalidAssets = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape({
infoTableName: "InfoTable",
dataShapeName: "ChildInfotable.DS"
});
var output = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape({
infoTableName: "InfoTable",
dataShapeName: "ParentInfotable.DS"
});
var message = "Please enter name";

output.AddRow({
"InvalidAssets" : InvalidAssets, //infotable
"StatusMessage" : message //string

});
var result = output;

 

attached is the output I'm seeing... but I would like to have empty infotable in the "InvalidAssets" feild as I'm trying to bind the child infotable from the output of the service to a grid in mashup.

 

 

 

 

 

ACCEPTED SOLUTION

Accepted Solutions

Hi @MC_9885914 

 

Actually, the child InfoTable is empty. If you convert InfoTable to JSON or inspect in Developer Tool, you can see an empty array in it.

 

Velkumar_1-1695962197875.png

 

If you pass a null value you won't get the child key in JSON

 

Velkumar_2-1695962242834.png

/VR

 

 

 

 

View solution in original post

1 REPLY 1

Hi @MC_9885914 

 

Actually, the child InfoTable is empty. If you convert InfoTable to JSON or inspect in Developer Tool, you can see an empty array in it.

 

Velkumar_1-1695962197875.png

 

If you pass a null value you won't get the child key in JSON

 

Velkumar_2-1695962242834.png

/VR

 

 

 

 

Announcements


Top Tags