Question
How to combine infotables and their meta data
It seems that when I combine infotables with "union" their meta data do not get combined. Is there a way to combine the meta data as well? Meta data are fields such as source, timestamp, tags, location, etc. The infotables are query results from a data table. When I set the output of the service as "INFOTABLE" and "infotable type" to "is Data Table", I still do not get the meta data.
let tableLength = someInfoT.rows.length;
for (let x = 0; x < tableLength; x++) {
let row = someInfoT.rows[x];
//Your code here
let query = {
"filters": {
"type": "And",
"filters": [{
"type": "EQ",
"fieldName": "SomeID",
"value": row.SomeID
},
{
"type": "LT",
"fieldName": "SomeDate",
"value": oneYearAgo
}
]
}
};
let queryResult = Things["SomeDataTable"].QueryDataTableEntries({
maxItems: undefined /* NUMBER */ ,
values: undefined /* INFOTABLE */ ,
query: query /* QUERY */ ,
source: undefined /* STRING */ ,
tags: undefined /* TAGS */
});
// result: INFOTABLE
result = Resources["InfoTableFunctions"].Union({
t1: result /* INFOTABLE */ ,
t2: queryResult /* INFOTABLE */
});
}

