Skip to main content
1-Visitor
September 28, 2023
Solved

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

  • September 28, 2023
  • 1 reply
  • 1096 views

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.

 

 

 

 

 

Best answer by Velkumar

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

 

 

 

 

1 reply

Velkumar19-TanzaniteAnswer
19-Tanzanite
September 29, 2023

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