Filter Things Based on the Property Value
Hi,
How can I Filter the Things based on Property value ?
Thanks,
Shashi.
Hi,
How can I Filter the Things based on Property value ?
Thanks,
Shashi.
or using the QueryImplementingThings / QueryImplementingThingsWithData / QueryImplementingThingsOptimized services like:
var query = {
"filters": {
"type": "And",
"filters": [{
"type": "EQ",
"fieldName": "TheProperty",
"value": "TheValue"
}, {
"type": "EQ",
"fieldName": "TheProperty2",
"value": "TheValue2"
}]
}
};
ThingTemplates["GenericThing"].QueryImplementingThingsWithData({
maxItems: Number.MAX_SAFE_INTEGER/* NUMBER */ ,
tags: undefined /* TAGS */ ,
nameMask: undefined /* STRING */ ,
query: query/* QUERY */
});- docs for Optimized service https://support.ptc.com/help/thingworx/platform/r9/en/index.html#page/ThingWorx/Help/Best_Practices_for_Developing_Applications/UsingTheQueryImplementingThingsOptimizedService.html
Need to watch out as the query most likely can only include properties the ThingTemplate you reference uses.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.