Community Tip - You can change your system assigned username to something more personal in your community settings. 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);