cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

UpdatePropertyValues throws : An Invalid Property Value Was Sent To Thing Property: [null]

SOLVED
Newbie

UpdatePropertyValues throws : An Invalid Property Value Was Sent To Thing Property: [null]

Hello Team,

I have few properties for a thing . Lets say properties are x,y and z. A custom service is written which will set the values for x, y and z in java server side extension. What I have done is. I have created a datashape which has same property definition as that of x, y and z. From this datashape created an infotable as below

DataShape freqComponentTimeSeriesDataShape = (DataShape) EntityUtilities.findEntity("FreqComponentTimeSeriesDataShape", ThingworxRelationshipTypes.DataShape);

InfoTable valueStreamInfoTable = freqComponentTimeSeriesDataShape.CreateValues();

Next , I have added values to the infotable. When I invoke the service UpdatePropertyValues  on the thing in server side extension code it throws the error as  An Invalid Property Value Was Sent To Thing  Property: [null].

The code is as below

Thing rollingStockThing = (Thing) EntityUtilities.findEntity("RollingStockThing", ThingworxRelationshipTypes.Thing);

rollingStockThing.UpdatePropertyValues(valueStreamInfoTable);

Thanks,

Azim

1 ACCEPTED SOLUTION

Accepted Solutions

Re: UpdatePropertyValues throws : An Invalid Property Value Was Sent To Thing Property: [null]

Hi,

var newEntry = new Object();

newEntry.time = new Date(T_UX*1000); // Time Stamp

newEntry.quality = undefined;

newEntry.name = "CirculationPumpPressure"; //Property 1

newEntry.value = CirculationPumpPressure; // Property 1 value

info1.AddRow(newEntry);//Add roe to infotable

newEntry.name = "DAQStatus";//Property 2

newEntry.value = DAQPowerStatus;// Property 2 value

info1.AddRow(newEntry);//Add row to infotable

Above code will update all property with same timestamp.

You need to initially add timestamp to your infotable and add other property & values.

Finally pass infotable to Updateproperty service

5 REPLIES 5

Re: UpdatePropertyValues throws : An Invalid Property Value Was Sent To Thing Property: [null]

Hi,

To use UpdatePropertyValues, infotable should have 4 field ( name, value,quality, timestamp).

name - Property name

value - Property value

quality - can be undefined

timestamp - Time

Add all your Property and Property values to infotable and pass it to "UpdatePropertyValues" service.

Re: UpdatePropertyValues throws : An Invalid Property Value Was Sent To Thing Property: [null]

Hi,

I guess this will update each property per timestamp. Then all the other properties will have different timestamp. My requirement is for the same timestamp update all properties i.e all properties should have same timestamp for each row.

Re: UpdatePropertyValues throws : An Invalid Property Value Was Sent To Thing Property: [null]

Hi,

var newEntry = new Object();

newEntry.time = new Date(T_UX*1000); // Time Stamp

newEntry.quality = undefined;

newEntry.name = "CirculationPumpPressure"; //Property 1

newEntry.value = CirculationPumpPressure; // Property 1 value

info1.AddRow(newEntry);//Add roe to infotable

newEntry.name = "DAQStatus";//Property 2

newEntry.value = DAQPowerStatus;// Property 2 value

info1.AddRow(newEntry);//Add row to infotable

Above code will update all property with same timestamp.

You need to initially add timestamp to your infotable and add other property & values.

Finally pass infotable to Updateproperty service

Re: UpdatePropertyValues throws : An Invalid Property Value Was Sent To Thing Property: [null]

Thanks Velkumar R

Re: UpdatePropertyValues throws : An Invalid Property Value Was Sent To Thing Property: [null]