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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

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

MC_9885914
2-Guest

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.

 

 

 

 

 

1 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

 

 

 

 

Top Tags