I have a customer layout which is 1:M with a job layout (one customer can have many jobs). The Job layout has a portal as expected.
The problem I'm having is that if I click on a job portal row and try to get data from that portal row, it's almost always wrong. FMP uses data from another row.
I don't see a way where FMP "knows" what darn portal row it's on even though I'm on that portal row and it's selected/highlighted.
UPDATE: I Got this working, one way at least.
Created a global variable as a selection trigger for the portal ($$activePortalRecord), value: GET(ActivePortalRecord). Then, in the script in question I Go to Portal Row by calculation using the $$activePortalRow value.
Maybe a better way to do it, but I haven't found it yet...