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

Invalid parameter type for service UpdatePropertyValues

SOLVED
Highlighted
Regular Member

Invalid parameter type for service UpdatePropertyValues

Hello,

I am trying to implement the functionality from the following PTC article:

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS256872&art_lang=en&posno=7&q=add%20values...

My code looks like this:

      var params = {

            infoTableName : "InfoTable",

            dataShapeName : "NamedVTQ"

        };

        var value = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params);

        var prop = new Object();

        prop.name = "DailyPouchCount";

        prop.value = 29907;  //hardcoded for testing

        prop.time = endDate;      //DateTime object from input

        prop.quality = "GOOD";   

        value.AddRow(prop);

        me.UpdatePropertyValues(value);

And I get the following error:

Wrapped java.lang.Exception: Invalid parameter type for service : [UpdatePropertyValues] on <ThingName> Cause: Invalid parameter type for service : [UpdatePropertyValues] on <ThingName>


Anyone have any idea why?


Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Invalid parameter type for service UpdatePropertyValues

Hi Jenna May​,

Following blog shoudl resolve your issue: How to use UpdatePropertyValues Service in ThingWorx

In the following line; the value infotable has be passed as part of JSON parameter

me.UpdatePropertyValues(value);


var params2 = { 

    values: value /* INFOTABLE */ 

 

}; 

me.UpdatePropertyValues(params2);

View solution in original post

3 REPLIES 3
Highlighted

Re: Invalid parameter type for service UpdatePropertyValues

Hi Jenna May​,

Following blog shoudl resolve your issue: How to use UpdatePropertyValues Service in ThingWorx

In the following line; the value infotable has be passed as part of JSON parameter

me.UpdatePropertyValues(value);


var params2 = { 

    values: value /* INFOTABLE */ 

 

}; 

me.UpdatePropertyValues(params2);

View solution in original post

Highlighted

Re: Invalid parameter type for service UpdatePropertyValues

That worked. Thank you!

Highlighted

Re: Invalid parameter type for service UpdatePropertyValues

Hi Jenna May​,

Glad it was helpful.

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum!