Jump to content
  • 0

Displaying data that has a many to many relationship in a Data Page


KenWi

Question

Hello Caspio users,

I seem to have an issue with Data Views and Many to Many relationships.

In the example of Teachers, Students and Classes I want to be able to list multiple entries of the many to many relationship in a single data page cell.

So if I make a view that lists all students by class, and the class has multiple teachers, I want the teachers Concatenated in a cell rather than listing a number of records for teacher A and a number of records for Teacher B.

Given Tables

Student

Student_ID

Student Name

 

Teacher

Teacher_ID

Teacher Name

 

Class

Class_ID

Teacher_ID

Student_ID

 

How would I tell the data page to create a line with All of the teachers, then list by student?

 

Hopefully this makes sense.

 

Please Advise,

Ken

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hello KenWi,

The table structure looks fine to me, since it is a many-to-many, you will always have the same teacher on multiple records. I think that you are trying to achieve something on the backend (Tables, Views) that should be configured on the frontend(DataPage).

Instead of trying to create such a View that has the "list" of Teachers (not sure if I have understood it correctly), you could use that View to create a Pivot table or a Report DataPage that groups the records based on the Teacher.

Check this how-to as it might solve what you are trying to achieve: https://howto.caspio.com/datapages/reports/advanced-reporting/data-grouping/

Or maybe, a Pivot table: https://howto.caspio.com/datapages/reports/pivot-table/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...