To explain I've addeed a screenshot.
The list is a View of all Locations connected to a Student. The first loop is indicated by the red rectangular.
Inside the loop there is a Relationship Form. In the settings of this form I can only choose either Student or Location to be set, but I know both. The only thing I need to add is the Workshop for this relationship, indicated by the green rectangular.
I'm open to do it differently as long as I can achieve the final goal (a Student being able to choose one of the Workshops for each Location that he has been assigned to.
Ah, just found this at the bottom of the Relationship Form admin page:
"Connecting a post to a given post or editing existing connections
-Create the form using this wizard.
-Create an "editing-mode" template and insert the form into it.
-Link to the template from the “display-mode” template or a View."
As I will (through code) add the Student-Location relations, I only need to update those relations with filling in the Workshop field. Maybe you can help with doing step 2 and 3? What's an editing-mode template? How do I "link" that template from the "display mode" or View?
Just occured to me: instead of showing a View of Locations, I had to show a View of Student-Location relations. Then added an Edit form for that very same relationship. Now it works!