Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
Solved! Go to Solution.
You can use the SearchModelTagTerm service to find it.
var params = {
maxItems: undefined /* NUMBER */,
types: {"items": ["Group"]} /* the type of item you're looking for */,
names: { "items": ["TW"] } /* change to your Vocabulary name */,
term: "Demo" /* change to your Term */
};
// result: INFOTABLE dataShape: EntityDescriptor
var result = Resources["SearchFunctions"].SearchModelTagTerm(params);
For this example, I had previously tagged a User Group with the "TW:Demo" tag (TW is the Vocabulary and Demo is the Term) and this code returned that item. (For a list of all the options for Types, check out this forum post.)
Note, though, that if the term exists it also returns as the first row "TW~ModelTagVocabulary". I found mention of this as a bug, but am unsure of the status of it. In my code I've worked around it by skipping if the ID is "TW~ModelTagVocabulary".
You can use the SearchModelTagTerm service to find it.
var params = {
maxItems: undefined /* NUMBER */,
types: {"items": ["Group"]} /* the type of item you're looking for */,
names: { "items": ["TW"] } /* change to your Vocabulary name */,
term: "Demo" /* change to your Term */
};
// result: INFOTABLE dataShape: EntityDescriptor
var result = Resources["SearchFunctions"].SearchModelTagTerm(params);
For this example, I had previously tagged a User Group with the "TW:Demo" tag (TW is the Vocabulary and Demo is the Term) and this code returned that item. (For a list of all the options for Types, check out this forum post.)
Note, though, that if the term exists it also returns as the first row "TW~ModelTagVocabulary". I found mention of this as a bug, but am unsure of the status of it. In my code I've worked around it by skipping if the ID is "TW~ModelTagVocabulary".