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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Get Entities based on Model tags

pshashipreetham
17-Peridot

Get Entities based on Model tags

Hi,

I do have a few Entities tagged with the tag Applications: Sprint1; how can I get all the Entities under that Tag in a Service output to have an Info table?

Thanks,

Shashi Preetham
1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

 

there is a Snippet to get an entity list, based on different search criteria. You can use a tag or a nameMask (allows a wildcard search). 

 

let params = {
maxItems: undefined /* NUMBER {"defaultValue":500} */,
nameMask: undefined,//"Test*" /* STRING */,
type: "Thing" /* STRING */, //Mashup,ThingTemplate,ThingShape, ...
tags: "PTC:Navigate" /* TAGS */
};

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

 

The result is an Infotable with the DataShape: "RootEntityList". If you want to get mashup, Templates etc in one Infotable, than you can use the snippet for different Types an simply join them with the Union Snippet.

 

let params = {
t1: table1 /* INFOTABLE */,
t2: table2 /* INFOTABLE */
};
let result = Resources["InfoTableFunctions"].Union(params);

 

Markus_Neini_0-1671694982707.png

Best regards
Markus

 

View solution in original post

1 REPLY 1

Hi,

 

there is a Snippet to get an entity list, based on different search criteria. You can use a tag or a nameMask (allows a wildcard search). 

 

let params = {
maxItems: undefined /* NUMBER {"defaultValue":500} */,
nameMask: undefined,//"Test*" /* STRING */,
type: "Thing" /* STRING */, //Mashup,ThingTemplate,ThingShape, ...
tags: "PTC:Navigate" /* TAGS */
};

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

 

The result is an Infotable with the DataShape: "RootEntityList". If you want to get mashup, Templates etc in one Infotable, than you can use the snippet for different Types an simply join them with the Union Snippet.

 

let params = {
t1: table1 /* INFOTABLE */,
t2: table2 /* INFOTABLE */
};
let result = Resources["InfoTableFunctions"].Union(params);

 

Markus_Neini_0-1671694982707.png

Best regards
Markus

 

Top Tags