I am developing my own experience in Thingworx studio. I just want to use Java script to invoke my custom Thingworx service with a parameter input. Thanks very much.
If you are looking to get the data from a ThingWorx service, then it can be done as:
var result = $scope.app.mdl['Thingname'].svc['servicename'] ;
// which invokes the service and returns the service output
And to assign the parameter value -
$scope.app.mdl['Thingname'].data.parameter['parametername'] = "input value" ;
In order to invoke service with the required input parameter, you can try assigning the parameter first and in the next step invoke the service execute step.
Hi, Giri. If i use script to set parameter like: $scope.app.mdl['ServiceItem-1'].data.parameter['currentStep'] = 'xxxxx', debug console will report error "TypeError: Cannot read property 'parameter' of undefined".
When I console.log the content of mdl object in the home.js as below:
I get the object nicely logged in the console
If I then copy the path to the BatteryCharge property (just under the pop-up) and try to log its value as follows:
I'll get the following error:
So it seems that the KCERoofBox object is undefined.
What am I doing wrong?
I've also tried the following call with the same results:
Please could someone help me out with this one?
Surveys are coming to the Vuforia Community! Your feedback is valuable to us! When prompted, please take our 60 second survey!