Search code examples
thingworx

Thingworx: filter QueryImplementingThingsWithData


I would like to use QueryImplementingThingsWithData. I created service GetPRwithoutCCR with corresponding code inside:

var query = {
    filters: {
        type: "EQ",
        fieldName: "name", value: "AAA"
    }
};

result = query;

enter image description here

But I am proceeding get all implemented things without applying filter. What am I doing wrong?


Solution

  • Do not trigger the "QueryImplementingThingsWithData" on Mashup Loaded. Trigger it using the ServiceInvokeCompleted event from "GetPRwithoutCCR". This way you make sure you have received the result from "GetPRwithoutCCR" and the query string is available.