GetNamedPropertyValues service throwing error
Hi everyone,
I am trying to get property values of thing by passing property names dynamically.
Using GetNamedPropertyValues service to achieve this.
I am passing two column names to service,but its considering one more empty column and throwing error like below.
Wrapped com.thingworx.common.exceptions.InvalidRequestException: Property [null] not found in [Plant 32] Cause: Property [null] not found in [Plant 32]
Plant 32 is my "Thing" name
sharing my code snippet ,Please suggest me where I am doing wrong.
var params_1 = {
infoTableName : "InfoTable",
dataShapeName : "ProdInfoColmn_DS"
};
// CreateInfoTableFromDataShape(infoTableName:STRING("InfoTable"), dataShapeName:STRING):INFOTABLE(ProdInfoColmn_DS)
var result_info = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params_1);
var newRow = new Object();
newRow.TargetQuantity = "TargetProduction_A";
newRow.ActualQuantity = "Production_A";
result_info.AddRow(newRow);
/*var fieldName = null;
result_info.RemoveField(fieldName);*/
var params = {
propertyNames: result_info /* INFOTABLE */
};
var result = Things["Plant 32"].GetNamedPropertyValues(params);
Appreciate your help..
Regards,
Rajee.
Message was edited by: Sushant Pandey



