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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Using SearchModelTagTerm to get a list of ThingTemplates with this tag

davidcor
1-Newbie

Using SearchModelTagTerm to get a list of ThingTemplates with this tag

I'm trying to get an infotable of Thing Templates that have a particular model tag. I can't figure out how to define the "types" parameter so that only ThingTemplates are returned

2 REPLIES 2
adam11
5-Regular Member
(To:davidcor)

Hi David,

The types parameter expects a JSON object of the following form:


  "items": ["Thing","ThingShape","ThingTemplate","DataShape","Network","ModelTagVocabulary","Mashup", "Menu","MediaEntity","StyleDefinition","StateDefinition","DataTagVocabulary","Group","User","ApplicationKey",

"Resource","Organization","Dashboard"]

}


In your case, you'd simply have an items array that contains one item, "ThingTemplate".


Regards,

Adam



Here is the ode that I am using and it is still returning all entity types

var myObject = new Object();

myObject = ;

var params = {

 term: "TrackingDeviceModelTemplate" /* STRING /,<br> types: myObject / JSON */
};
var result = Resources["SearchFunctions"].SearchModelTagTerm(params);

 

Top Tags