Page 1 of 1

how to store total of user has been signup?

Posted: Tue May 05, 2015 4:59 pm
by Nisa Khalid

i have made registration for two user ,one for parents and one for kids
parents need to register first then parents have register for their kids, parents only allowed to register 3 kids only. means that one parents can add 3 children

i want to store the total of kid has been register by their parents and if the total more than 3 ,they cannot add/register another kids. i want to store the total and make validation? how can i do this? i'm still new with appery.io and i'm a student


how to store total of user has been signup?

Posted: Tue May 05, 2015 7:00 pm
by Serhii Kulibaba

Hello Nisa,

You can save amount of registered children in additional column:
https://devcenter.appery.io/documenta...


how to store total of user has been signup?

Posted: Wed May 06, 2015 12:54 am
by Nisa Khalid

i have collection myKids in database? is it put in this collection?


how to store total of user has been signup?

Posted: Sat May 09, 2015 5:31 pm
by Alena Prykhodko

Hello Nisa,

Yes. You can use the same collection.


how to store total of user has been signup?

Posted: Mon May 11, 2015 12:55 pm
by Nisa Khalid

okay, how can i get the value of registered user?


how to store total of user has been signup?

Posted: Tue May 12, 2015 2:15 am
by Yurii Orishchuk

Hi Nisa,

You need to use "count" request parameter for your "list/query" service.

More info here: https://devcenter.appery.io/documenta...

Here is a common steps to populate label with count rows in db, you can also use here "where" request parameter for narrow items:

  1. Open your list service.

  2. Add "where" and "count" request parameters. http://prntscr.com/51gys0/direct

  3. Navigate to "Test" tab and click "Test". You will get result of all item counts.

  4. Click "Import as response". http://prntscr.com/51gzdz/direct

  5. Navigate to "response" tab and check if you have parameters like on screen shot: http://prntscr.com/51h078/direct

  6. Add this service to the page.

  7. Open "Success" mapping for this service. And create link from "count" to label component you need. http://prntscr.com/51h23q/direct

  8. Now you need to invoke this service datasource by event you wish. For example on "page load" or "button click" etc...

    Regards.


how to store total of user has been signup?

Posted: Wed May 13, 2015 6:34 pm
by Nisa Khalid

thank you,this is very useful but i need to know
what if i don't want to display it?
for example the parents can register their kids after they has login,so i want to use the value from count is for if the user has register for their kids more than 3 times ( the kids register in another page)
i already follow the step and i found i dont have any label cause i don't want to display it