Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
partResult = Things["SmartParts.DataBaseSystem-TH"].GetWhereUsedImmediateParent({
COMPONENT_ITEMNUMBER: PartNumber /* STRING */
});
let sum = Resources["InfoTableFunctions"].CreateInfoTable();
logger.debug("GetWhereUsedImmediateParent: sum IT length is "+sum.length);
//sum.AddField({name: "Sum", baseType: "NUMBER"});
let params = {
t: partResult /* INFOTABLE */,
columns: "_12_Month_FORECASTED_USAGE" /* STRING */,
aggregates: "SUM" /* STRING */
};
result = Resources["InfoTableFunctions"].Aggregate(params);