(This is fascinating because it gives me an idea for another app that I have in mind related with a gamified app for parents and kids that allows parents to give awards to their kids when they sleep all night long in their rooms.)
However, let me reformulate my question because I might be wrong but I think that your answer is not related to my question.
Let’s say that I want to model an admin app for science clubs where I have students that form groups and their work is organized in activities.
Activities have a starting date and an end date and they are assigned to sub-groups from the main group.
I’d like to have a tab showing Activities grouped by Group. Then, when I click on an Activity I want to see the details including an inline list with the students assigned to the Activity.
From this detailed view, I want to be able to select students from the main group and add (assign) them to the Activity. (I also want to remove them from the Activity, but I already solved the problem.)
In order to do that I created a tab listing the Activities (grouped by Group). Then (for the sake of giving more context to this explanation) in the Activities > detail view screen I have an inline list with the students assigned to the Activity. Then I want to either show a list of students in the Group so I can assign them to the Activity being displayed, or have a button that takes me to a screen containing the list of students in a Group.
In either case, I want to be able to select an item from the list and trigger an action that assigns the student to the parent Activity (either the one being showed or the one from the previous screen).
How can I access the parent Activity’s ID from the inline list of students so that I can assign it to the student’s Activity?