Page 1 of 1

master detail or including related records from different collections

Posted: Thu Nov 28, 2013 9:57 pm
by chansdad

master detail relationship reg ..

I have two collections , a master and a child , much like student and class . Each class can have multiple students . I would like to get a list of all the students in a class by their first name.

With a pointer column in class collection that points to student collection . I can include the student when i retrieve the class collection .Seems like this is working off of the "id" column . which itself is unique per record . I would like to relate them based on another column other than "id".

What is the best approach ? any examples would be greatly appreciated.

Thanks


master detail or including related records from different collections

Posted: Thu Nov 28, 2013 11:30 pm
by Alena Prykhodko

Hello,

Please check this doc http://docs.appery.io/documentation/b...


master detail or including related records from different collections

Posted: Sat Nov 30, 2013 5:51 pm
by chansdad

I have read the documentation .

Attached are the screenshots for the collections - students, class, studentclasses

I want to set up a form that shows list of students who have not registered for a class and whose state is not false . Ex this form would be useful to suggest a class to a student who is not enrolled in any class ...

How do i go about it?

Thanks Image Image Image


master detail or including related records from different collections

Posted: Sat Nov 30, 2013 7:34 pm
by Igor

Hello,

There are two ways how can you implement this:

  1. Create three services. Invoke one service , map response to localStorage and use localStorage value for second service where cause.
    http://docs.appery.io/documentation/b...

  2. Implement this using JS.
    http://docs.appery.io/documentation/u...