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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Invalid parameter type for service UpdatePropertyValues

jmay1
5-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%20to%20value%20stre…

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
ankigupta
5-Regular Member
(To:jmay1)

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
ankigupta
5-Regular Member
(To:jmay1)

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);

jmay1
5-Regular Member
(To:ankigupta)

That worked. Thank you!

ankigupta
5-Regular Member
(To:jmay1)

Hi Jenna May​,

Glad it was helpful.

Top Tags