Skip to main content
6-Contributor
Sep 6, 2023 1:02 PM UTC
Solved

GetPropertyDefinations in ThingTemplate

Avinash_Shukla_0-1694004539266.png

I created a couple of properties in a ThingTemplate and I wanted to retrieve them using the service "GetPropertyDefinations" but there is no data in a result . so how  can I retrieve the Property names from ThingTemplate?

 

 

 

 

 

 

 

 

 

 

 

ashabanAnswer
12-Amethyst
Sep 6, 2023 2:52 PM UTC

Can you please try 

// result: INFOTABLE dataShape: "PropertyDefinition"
let result = ThingTemplates["GenericThing"].GetInstancePropertyDefinitions({
type: undefined /* STRING */
});

 

ashaban_0-1694011940146.png

 

2 replies

ashaban12-AmethystAnswer
12-Amethyst
Sep 6, 2023 2:52 PM UTC

Can you please try 

// result: INFOTABLE dataShape: "PropertyDefinition"
let result = ThingTemplates["GenericThing"].GetInstancePropertyDefinitions({
type: undefined /* STRING */
});

 

ashaban_0-1694011940146.png

 

Translate
6-Contributor
Sep 7, 2023 4:50 AM UTC

I appreciate the solution provided, but my specific need entails filtering the properties after acquisition, primarily based on their category or multiple base types.

Translate