Skip to main content
1-Visitor
April 29, 2016
Question

Query all implemented thing with filter

  • April 29, 2016
  • 5 replies
  • 3772 views

I have such thingShape:

name: STRING

report: TEXT

internalThing(ccr): Thing Name

I would like to Query all implemented things that doesn't have internalThing.

I tried QueryAllImplementedThings service of my Template

Selection_035.png

I don't see any negative predicates.

5 replies

22-Sapphire I
April 30, 2016

You may need to use a custom Service

if you look at the Query parameters available: Query Parameter for Query Services

There is NE, NOTLIKE, NOTIN

srudenkov1-VisitorAuthor
1-Visitor
May 1, 2016

Pai Chung, thank you for answer. Could you, please, be more specific about where I should pass my query code?

Lets say I have chosen thise code to be my filter:

var query = {
     filters: {
          type: "MissingValue, NotMissingValue",
          fieldName: "OrderQuantity"
     }
};

Should I pass it as String into "query" param of QueryAllImplementedThings? Should I implement my own service for it?

Thanks in advance!

srudenkov1-VisitorAuthor
1-Visitor
May 3, 2016

I created service GetPRwithoutCCR ​with corresponding code inside:

var query = {

    filters: {

        type: "EQ",

        fieldName: "name", value: "AAA"

    }

};

result = query;

Selection_038.png

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

5-Regular Member
May 3, 2016

Are you invoking the QueryImplementingThingsWithData after your Query service runs ? If not then QueryImplementingThingsWithData service may be running with an empty input query as it is being triggered before or at the same time as your query service...  check if invoking it after solves your problem !!


For brevity I think its always good  practice to follow what Pai suggested in a prior reply.