Skip to main content
12-Amethyst
May 24, 2017
Solved

How can field values be read from an infotable?

  • May 24, 2017
  • 2 replies
  • 3155 views

I'm trying to set the values of a newly created property using value that exist in an external infotable:

var location = new Object();

location.latitude = Things[networkAssetName].location;

location.longitude = Things[networkAssetName].location;

location.elevation = 0;

location.units = "WGS84";

These are the result i'm seeing from the above code.

How can i access the correct columns of the infotable?

Thanks,

Andy

Best answer by aseaton

Solution:

for separate values:

var latitude = Things[networkAssetName].location.Location.latitude;

var longitude = Things[networkAssetName].location.Location.longitude;

var infotable = Things[networkAssetName].location.Location;

2 replies

1-Visitor
May 24, 2017

var elevation=Things[networkAssetName].location.latitude;

var longitude=hings[networkAssetName].location.longitude;

aseaton12-AmethystAuthorAnswer
12-Amethyst
May 25, 2017

Solution:

for separate values:

var latitude = Things[networkAssetName].location.Location.latitude;

var longitude = Things[networkAssetName].location.Location.longitude;

var infotable = Things[networkAssetName].location.Location;