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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

local binding through script

davidcor
1-Newbie

local binding through script

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.

2 REPLIES 2
adam11
5-Regular Member
(To:davidcor)

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



fmanniti
9-Granite
(To:adam11)

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?

Top Tags