Page 1 of 1

using a js to get a field from users collection

Posted: Tue Sep 22, 2015 3:08 pm
by Antonio Saioni

In users collection i've added a field called "categoria" actually if you are a user i need to open the user page and if you are a contractor you'll go to contractor page.
but i'm not able to create a js to extract this information.


using a js to get a field from users collection

Posted: Tue Sep 22, 2015 5:49 pm
by Illya Stepanov

Hi Antonio -

I'm not sure I understand what you are trying to achieve with such approach.

To get data from the database you will need to invoke service, here you can find more details: https://devcenter.appery.io/documenta...


using a js to get a field from users collection

Posted: Wed Sep 23, 2015 8:43 am
by Antonio Saioni

Hi Illya, the users collection return only id and token and i need another field called "categoria".
honestly i'm not so keen on apperyio, i've read documentation about but i don't understand how get data via js.

and i want to write a js to get from users collection id token and categoria instead of mapping and invoking service

thanks for your patience..


using a js to get a field from users collection

Posted: Wed Sep 23, 2015 9:05 pm
by Serhii Kulibaba

Hello Antonio,

You can not read such data before getting from the DB. You are able to get it via service or simple GET request


using a js to get a field from users collection

Posted: Wed Sep 23, 2015 11:52 pm
by Jack Bua

You will need to create your own service for the users table.

https://getsatisfaction.com/apperyio/...

This is what it sounds like you need to do, as am I. I have several new columns on the users table and I rad and update them all the time in my app.