Page 2 of 2

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

Posted: Tue Nov 19, 2013 8:15 pm
by Kateryna Grynko

Hi Louis,

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


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

Posted: Tue Nov 19, 2013 8:49 pm
by Louis Adekoya

Thanks Katya.


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

Posted: Wed Nov 20, 2013 12:28 am
by Louis Adekoya

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.


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

Posted: Wed Nov 20, 2013 12:45 am
by Louis Adekoya

Please ignore my question above - I spotted my error.