That is exactly what I would like it to do. So I had to use a FilterValues function to make this work?
I'm not sure how this works but if you have the time I would appreciate a more detailed answer on how this works. But if you don't have the time I still really appreciate your answer.
Thank you very much
When you set the "focus" key into a global, it's the same for every record. So we don't want to keep showing, say, Jane Doe's Shop class stuff while we're looking at the Physics class. Also, when you first get to a record, we don't want to just show no reports at all.
So, the function for the focus calc is basically saying: "if we have a join record focused that's relevant to this record, go ahead and use it, but otherwise make the first join record the focus."
I'm sure there are (at least) dozens of ways to accomplish what you're after, but this is a method I've used before, and seemed like it'd work for your purposes.
Another way, for example, would be to not make your focus selection a global, so you wouldn't have to worry about linking to an irrelevant record. Another thought is to use "hide when" to have the reports portal just disappear if there's no (or no relevant) join record selected.
You may also want to consider conditional formatting to highlight the record in the left portal that is the "focus" of the second portal, just for better clarity in the interface.
So, lots of ways to skin this particular cat. The filterValues function, while it's very useful, isn't particularly magic.
For the core thing, showing reports for a particular enrollment ("join"), it sounds like you were down the right path, with setting a global. It's a way to get past the (pretty reasonable) limitation where you can't show a portal within a portal.