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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

problem accessing my properties from within javascript

kyetzer
10-Marble

problem accessing my properties from within javascript

I am using the following version of Thingworx:     5.0.0.425.  I have created several things  from the  Thing  Template:    RemoteThingsWithTunnelAndFileTransfer,      On each one of these things I created a couple of properties:     country and vncpassword,  I have given each one of these properties a default value and a regular value.  Inside a service defined in a thing template I am using the following code to retrieve all the properties from these things:



var implementingThings = ThingTemplates["RemoteThingWithTunnelsAndFileTransfer"].GetImplementingThingsWithData();


for (var x = 0; x < implementingThings.getRowCount(); x++) {

var row = implementingThings.getRow(x);

    if (row.description != ''){

      var newRow = {};

        newRow.thingName = row.name;

        newRow.desc = row.description;

        newRow.lastTransferDate = row.lastConnection;

        if (row.isConnected){ newRow.isConnected = "/Thingworx/MediaEntities/Connectedbut";  }

        else  newRow.isConnected = "/Thingworx/MediaEntities/Disconnectedbut" ;                  

        newRow.country = row.country;

        try{

          newRow.vncpasswd = row.vncpasswd;

        } catch (err){ newRow.vncpasswd = ''; }

        result.AddRow(newRow);

    }


The values for country and vncpasswd  are being returned as undefined for each one of the things.  Is this is a bug or am I doing something wrong?



0 REPLIES 0
Top Tags