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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

QueryImplementingThingsWithData

ad'orso-2
1-Newbie

QueryImplementingThingsWithData

good morning

I need to take some of the thing properties that are associated with a thing template.

I use QueryImplementingThingsWithData as shown below.

But in this way I get all the properties instead of me interests only one specification.

Can someone help me?

Example

Var params = {

MaxItems: undefined / * NUMBER * /,

NameMask: undefined / * STRING * /,

Query: undefined / * QUERY * /,

Tags: undefined / * TAGS * /

};

// result: INFOTABLE dataShape: RootEntityList

Var list = ThingTemplates ["ThingTemplate"]. QueryImplementingThingsWithData (params);

Thank you

4 REPLIES 4
supandey
19-Tanzanite
(To:ad'orso-2)

Antonio, for further filtering on the data returned are you using the Query with that you can include AND/OR to filter out the result

Matches or NotMatches filter

var query =

{

    "filters": {

        "type": "Matches|NotMatches",

        "fieldName": "Source",

        "expression": "(Kettle)|(Filler)"

    }

};

Thank you for your answer.

Ok i know this feature

But I'm interested in taking all the values of the "fieldName": "Source"

Without "expression":

But if I do not write the expression goes wrong

And I also need to have the data of two fieldName" different

How can I do?

ankigupta
5-Regular Member
(To:ad'orso-2)

Antonio D'Orso​,

Per my understanding; you can either remove the columns using: InfotableName.RemoveField(fieldName);

Or create a new InfoTable and copy the required fields in that Infotable by using Infotable for loop snippet.

Thanks Ankit

Ok,so I get the result.
But my request was due to the fact that using the QueryImplementingThingsWithData that returns all of the property values I believe is a waste of resources.
For example if I have 100 things linked to the thing template with 100 properties, but these only affect me two, the QueryImplementingThingsWithData service will return 10000 values instead of the 200 affected values.
So I was wondering if I can only extract the properties I'm interested in directly with the QueryImplementingThingsWithData service.

Top Tags