Michael Martinez
Posts: 0
Joined: Fri Aug 30, 2013 7:00 pm

Query help.

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.

Michael Martinez
Posts: 0
Joined: Fri Aug 30, 2013 7:00 pm

Query help.

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?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Query help.

Hi Michael,

We'll take a look and update.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Query help.

Try the following:

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

Return to “Issues”