Skip to main content
1-Visitor
April 27, 2017
Question

QueryImplementingThingsWithData

  • April 27, 2017
  • 1 reply
  • 3264 views

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

1 reply

5-Regular Member
April 27, 2017

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)"

    }

};

ad'orso-21-VisitorAuthor
1-Visitor
April 27, 2017

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?

5-Regular Member
April 27, 2017

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.