Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
Hi,
I have a Thing Template named "CommonThingTemplate", there are 5 ThingTemplates created based on the CommonThingTemplate.
Now how can I get all the ThingTemplates created based on the CommonThingTemplate?
Thanks,
Solved! Go to Solution.
You could use
let result = ThingTemplates["CommonThingTemplate"].GetIncomingDependenciesAsNetwork({
maxDepth: 1 /* NUMBER {"defaultValue":10} */,
maxItems: undefined /* NUMBER {"defaultValue":500} */
});
// only consider items with parentType == "ThingTemplate"
I am not aware of a direct query like 'QueryImplementingThingTemplates' which exists for Things (QueryImplementingThings).
You could use
let result = ThingTemplates["CommonThingTemplate"].GetIncomingDependenciesAsNetwork({
maxDepth: 1 /* NUMBER {"defaultValue":10} */,
maxItems: undefined /* NUMBER {"defaultValue":500} */
});
// only consider items with parentType == "ThingTemplate"
I am not aware of a direct query like 'QueryImplementingThingTemplates' which exists for Things (QueryImplementingThings).