Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
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
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?
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.