Page 1 of 1

Query help.

Posted: Fri Sep 13, 2013 6:26 pm
by Michael Martinez

A CreepySituation's ReportedBy and ResolvedBy fields both contain pointers to UserProfile objects.

A UserProfile has an "OrgCode" field which I want to pass in. I want to return all CreepySituations reported by people who belong to a given organization, that have not been resolved by anyone.

Here's what I've been trying:

{ "ReportedBy" : { "collName" : "UserProfile", "OrgCode" : "" , "ResolvedBy" : null } }

This does not appear to be close to correct. Am I making sense?

This syntax is enfuriating.


Query help.

Posted: Fri Sep 13, 2013 6:27 pm
by Michael Martinez

We are talking about using an appery service, by the way, on the testing screen. And that json object should look like this :

{ "ReportedBy" : { "collName" : "UserProfile", "OrgCode" : "(paramValue)" , "ResolvedBy" : null } }

can anyone help?

Update:

I used the following to return all the CreepySituations narrowed by OrgCode :

{ "ReportedBy" : { "$inQuery" : { "OrgCode" : "(paramValue" } } }

So how can I further limit it to those with empty ReportedBy fields? I must admit that I don't really know what I'm doing here. Have I mentioned that this syntax is infuriating?


Query help.

Posted: Fri Sep 13, 2013 6:48 pm
by Kateryna Grynko

Hi Michael,

We'll take a look and update.


Query help.

Posted: Fri Sep 13, 2013 7:49 pm
by Kateryna Grynko

Try the following:

code{$and: [{ "ReportedBy" : { "$inQuery" : { "OrgCode" : "(paramValue" } } }, { "ResolvedBy": null } ] }/code