Creating Many to Many relationship

Hello Foundry Community,

I’m new to Palantir and still learning the ropes, so I appreciate your patience with what might be a basic question.

I’m building an internal application in Foundry Workshop for our organization, and I’m currently working with two ontologies: Student and Course. There is a many-to-many relationship between them via a join table called StudentCourse. This relationship is already defined in our backend using Prisma schema.

Here’s what I’ve done so far:

  1. Created an ontology object for Student
  2. Created an ontology object for Course
  3. Created an ontology object for the join table StudentCourse
  4. Created a link type in the ontology using the StudentCourse join table
  • I selected Student and Course as the object types to link
  • I used StudentCourse as the join table dataset
  • I matched the appropriate ID columns between them

I can now see the many-to-many relationship in the ontology editor. However, I’m having trouble displaying this linked data properly in Workshop.

My goal is to show:

  • A list of all courses linked to a selected student
  • Or all students linked to a selected course

Could someone help guide me on how to set this up in Workshop? Specifically, how to use variables or linked object filters to access and display this many-to-many data?

Thank you so much in advance!

Hi!

In workshop, you can create a new variable in the variables tab. The first variable could be your student (maybe selected via an object dropdown). Then, create a second variable: student linked courses. For this variable, start from the student object set, and click “get linked objects”. This will populate the variable with all courses linked to the student. You could show all these courses in an object table.

You can repeat this process to go the opposite way from a course to all students in the course.

Hope that’s helpful!

1 Like