Skip to main content
1-Visitor
August 6, 2014
Question

local binding through script

  • August 6, 2014
  • 1 reply
  • 1487 views

I'm trying to pass the name of "TrackerThing" to a service on a "CarThing" to bind the location property of the tracker to the car.

var params = {

    propertyName: "location" /* STRING /,<br>    sourceThingName: trackerName / STRING /,<br>    sourcePropertyName: "location" / STRING */
};

me.SetLocalPropertyBinding(params);

The service runs with no effect. In the app log I see this error: "Invalid service name: GetRemoteMetadata"

I can perform this action manually.

1 reply

5-Regular Member
August 11, 2014

Hi David,

I've created a case (#12119975) in our PTC eSupport Portal for this issue and you should have received an email with instructions for viewing it.


Regards,

Adam



1-Visitor
July 7, 2016

Sorry, I have the same issue with that function.

I have this code

var thingName = "DS-TH_prova";

var remThingName = "DS-RemTH_prova";

var paramsTH = {

    name: thingName,

    thingTemplateName: 'DeviceSimulatorTemplate',

    tags: tags

};

Resources["EntityServices"].CreateThing(paramsTH);

var paramsRemTH = {

    name: remThingName,

    thingTemplateName: 'DeviceSimulatorRemoteTemplate',

    tags: tags

};

Resources["EntityServices"].CreateThing(paramsRemTH);

var props = {

    propertyName: 'PropNum_4', //<<<<Property in Remote thing

    sourceThingName: thingName,

    sourcePropertyName: 'Temperature' //<<Property in thing

};

Things[remThingName].SetLocalPropertyBinding(props);

but it won't work.

Did you solve it a the end?