We are working to address an issue with subscription email notifications. In the meantime, be sure to check your favorite boards for new topics.
Can someone provide an example of using GetNamedProperties and GetNamedPropertyValues from Javascript? The first call takes a JSON object, and the second takes an INFOTABLE, but I haven't been able to find any documentation on what that JSON object or INFOTABLE should look like ...
Thanks !
Solved! Go to Solution.
Hi Shaun,
The JSON object GetNamedProperties() takes as input (propertyNames) consists of a single JSON array (items):
var propertyNames = { "items": ["name", "stringProperty", "numberProperty"] }
var propertyValues = Things["ExampleThing"].GetNamedProperties({ propertyNames: propertyNames })
Similarly, GetNamedPropertyValues() is expecting an InfoTable with a DataShape of EntityList:
var propertyNames = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape({ dataShapeName: "EntityList" })
propertyNames.AddRow({ name: "name" })
propertyNames.AddRow({ name: "stringProperty" })
propertyNames.AddRow({ name: "numberProperty" })
var propertyValues = Things["ExampleThing"].GetNamedPropertyValues({ propertyNames: propertyNames })
Hi Shaun,
The JSON object GetNamedProperties() takes as input (propertyNames) consists of a single JSON array (items):
var propertyNames = { "items": ["name", "stringProperty", "numberProperty"] }
var propertyValues = Things["ExampleThing"].GetNamedProperties({ propertyNames: propertyNames })
Similarly, GetNamedPropertyValues() is expecting an InfoTable with a DataShape of EntityList:
var propertyNames = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape({ dataShapeName: "EntityList" })
propertyNames.AddRow({ name: "name" })
propertyNames.AddRow({ name: "stringProperty" })
propertyNames.AddRow({ name: "numberProperty" })
var propertyValues = Things["ExampleThing"].GetNamedPropertyValues({ propertyNames: propertyNames })
Thanks Adam - I will give this a try !!