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
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
I don't see any negative predicates.
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
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!
I created service GetPRwithoutCCR with corresponding code inside:
var query = {
filters: {
type: "EQ",
fieldName: "name", value: "AAA"
}
};
result = query;
But I am proceeding get all implemented things without applying filter. What am I doing wrong?
The data being filtered is the result coming back from QueryImplementingThingsWithData not your own GetPRWithoutCCR service.
So if your GetPRWithoutCCR is the right service, then the Query has to be passed into that service and applied to the recordset within that service.
If QueryImplementingThingsWithData is at the basis of that service, then invoke that server side within GetPRWithoutCCR applying the query at that time and then moving on from there to produce the proper output.
Right now you are calling each service individually and they are returning their own recordset to the client.
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.