Page 1 of 1

Query information of created column - Users Collection

Posted: Mon Feb 03, 2014 9:29 pm
by Caio

Hi,

I’m trying to query information of a created column in the Users collection using a saved local variable. Is it possible to query information of a created column directly on the Users Collection? Or do I need to create another collection with a pointer to Users?

Image


Query information of created column - Users Collection

Posted: Mon Feb 03, 2014 9:36 pm
by Maryna Brodina

Hello! Sure, it's possible - here is more information http://docs.appery.io/documentation/b... (User queries)


Query information of created column - Users Collection

Posted: Mon Feb 03, 2014 10:03 pm
by Caio

Thanks Maryna, but I don't see where this Database service has been created:

Image

Could you please inform what exactly I should do?

I have all services created for the other collections, except for the Users.


Query information of created column - Users Collection

Posted: Mon Feb 03, 2014 10:17 pm
by Caio

I'm sorry I have figured it out already.

One more question:

I've made a test tying to use the following code to query this tipoUsuario column with a saved local variable:

return '{"tipoUsuario" : "'+value+'"}';

Image

Image

Image

But nothing happens.

I've checked the local variable pointing the response to a Label on the UI and it's being saved correctly.

Image

Thanks


Query information of created column - Users Collection

Posted: Mon Feb 03, 2014 10:24 pm
by Caio

Just one correction.

The code used in the where clause is:

return '{"_id" : "'+value+'"}';


Query information of created column - Users Collection

Posted: Mon Feb 03, 2014 10:39 pm
by Igor

Hello,

When you test the query service in Test tab - Were you getting results from the service?
Are the any errors in browser console when you test app?


Query information of created column - Users Collection

Posted: Mon Feb 03, 2014 10:49 pm
by Caio

Igor,

I got it.

Thank you!