2 Replies Latest reply on Jul 7, 2016 12:10 PM by fmanniti RSS
    davidcor Apprentice

    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.


      • local binding through script
        adam Creator

        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



          • Re: local binding through script
            fmanniti Creator

            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?