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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

and Thing Template

Saranya_S
12-Amethyst

and Thing Template

Hi ,

    In ThingWorx , any snippet is available to get the list of Thing Template and Thing names .

 

Thanks In Advance.

ACCEPTED SOLUTION

Accepted Solutions

Snippet is:
var params = {
maxItems: undefined /* NUMBER */,
nameMask: undefined /* STRING */,
type: "Thing" /* STRING */,
tags: undefined /* TAGS */
};

// result: INFOTABLE dataShape: RootEntityList
var result = Resources["EntityServices"].GetEntityList(params);

View solution in original post

5 REPLIES 5

Hi,

 

If you are asking how to get the list of Templates or Things from Thingworx, you can use Resources > EntityServices > GetEntityList service, using Type = Thing or Type=ThingTemplate.

 

Hope it helps,

Raluca Edu

Snippet is:
var params = {
maxItems: undefined /* NUMBER */,
nameMask: undefined /* STRING */,
type: "Thing" /* STRING */,
tags: undefined /* TAGS */
};

// result: INFOTABLE dataShape: RootEntityList
var result = Resources["EntityServices"].GetEntityList(params);

Thanks for the quick updated and the snippet doesn't display the thing template for each thing so how to achieve this. 

To get the template for each thing, you can use the GetThingTemplate service:

 

result = me.GetThingTemplate();

 

Hope it helps,

Raluca Edu

slangley
23-Emerald II
(To:Saranya_S)

Hi @Saranya_S.

 

If you feel your question has been answered, please mark the appropriate response as the Accepted Solution for the benefit of others with the same question.

 

Thank you for your participation in our community.

 

Regards.

 

--Sharon

Announcements


Top Tags