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

Help needed with where clause - retrieve data for logged in user

Hi Louis,

You cannot return one field. Instead, you can remove the fields you don't need from the response.

Louis Adekoya
Posts: 0
Joined: Sun Nov 17, 2013 10:51 pm

Help needed with where clause - retrieve data for logged in user

Hi Maryna/Katya,

When I try Maryna's query above in Test, with a specific user id, it works great. However when I try to make the user id dynamic by using a local variable in the where clause (as javascript) it doesn't. Here is what I have:

' return {"group": {"$inQuery": {"active": true}}, "member": {"$inQuery": {"_id": "'+value+'"}}}';

I am concerned that the last bit "'+value+'" may be wrong. Is the syntax wrong? When I try to debug I just get incorrect query.

Louis Adekoya
Posts: 0
Joined: Sun Nov 17, 2013 10:51 pm

Help needed with where clause - retrieve data for logged in user

Please ignore my question above - I spotted my error.

Return to “Issues”