How to create a nested Infotable in a stream
Good day Community,
I have a stream and I write to this stream in serviceA.
The stream has a field of type infotable.
So when adding a row to the stream in serviceA, I do not add anything to the nested infotable yet.
I have service B where I intend to write to the nested infotable.
This is my code:
let Stream = Shaft_Name;
// result: INFOTABLE dataShape: ""
let Stream_Data = Things[Stream].QueryStreamEntriesWithData({
oldestFirst: undefined /* BOOLEAN */,
maxItems: undefined /* NUMBER {"defaultValue":500} */,
sourceTags: undefined /* TAGS */,
endDate: undefined /* DATETIME */,
query: undefined /* QUERY */,
source: undefined /* STRING */,
startDate: undefined /* DATETIME */,
tags: undefined /* TAGS */
});
let Updated_Info = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape({
infoTableName: "InfoTable",
dataShapeName: "ShaftSinkingCycleDelayInfo_DS"
});
let len = Stream_Data.length;
let Activity_Unique_Id;
let Delay_Info;
for(let i=0; i<len; i++){//Looping through the stream
Activity_Unique_Id = Stream_Data[0].activity_unique_id;//get the specific row to update
input
let x = Activity_Unique_Id;
Updated_Info.AddRow({delay_id:x});
Things["Stream"].AddStreamEntry({
sourceType: undefined /* STRING */,
values: Updated_Delay_Info /* INFOTABLE */,
location: undefined /* LOCATION */,
source: me.name /* STRING */,
timestamp: undefined /* DATETIME */,
tags: undefined /* TAGS */
});
Updated_Info.RemoveAllRows();
}
let result = Stream_Data[Delay_Information];//outputting the nested infotable
I do not get the nested infotable.
How can do I write to a column inside a nested infotable?
Regards,

