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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Invalid parameter type for service UpdatePropertyValues

jmay1
10-Marble

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.

ACCEPTED SOLUTION

Accepted Solutions
ankigupta
12-Amethyst
(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
12-Amethyst
(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
10-Marble
(To:ankigupta)

That worked. Thank you!

ankigupta
12-Amethyst
(To:jmay1)

Hi Jenna May​,

Glad it was helpful.

Announcements


Top Tags