Not only is this slow, but two users doing this at the same time will see each other's selected records.
Why not put the summary data in the header and use a list view of the recrods found instead of using a portal?
@Phil i chose the self-join portal because i really want a scrollable list of related records, rather that having users use the 25 records at a time method.
i prefer to just close and lock the sidebar, rather than offer users more places to mess things up.
i cant think of a way to solve this issue tho. perhaps i need to rethink? how else can i get related records to show up?
The problem here is that you don't have related records until you go through a lot of steps to establish the relationship. You can add your own button for the next 25 or so records to your layout so that you can still hide the status area. I think you should consider that option carefully as it is much simpler and faster than putting together a portal that lists your found records.
As it happens, I do know of a method that may work--haven't tried in an IWP setup so you'll have to test. It should be a little bit faster, and the found set of one user won't get mixed together with the found sets of other users.
Using your self join, set up this relationship:
Main::gIDList = FoundSet::IDfield
Main and FoundSet are table occurrences of the same data source table. gIDList is a global text field. IDField is a field with an auto-entered serial number so you can uniquely identify every record in your found set. If you haven't already defined such a field, you'll need to add it, then use Replace Field Contents with the serial number option to add a serial number to all existing records in this table.
Add two layouts to your solution, both based on either Main or FoundSet. (Specify the same table occurrence your script uses when performing the find for the "IDFields" layout I describe next.)
Put gIDList as the sole field on layout "ID GLobal". Put only the IDField on the layout called "IDFields". Do not put any other fields on this layout.
Now after performing a find to find the records, your script would do the following:
Go to Layout["IDfields"]
Copy All Records
Go To Layout ["ID GLobal" (Main)]
Go To Layout [original layout]
Copy all records copies the data of your found set to the clip board. Data from all fields on the layout are copied. The individual field values are separated by tab characters, records are seperated by returns, so with this layout, you get a list of all the serial numbers of your found records copied to the clipboard.
In a FileMaker relationship, putting a return separted list of values into a key field matches any single value in the list to values in the related table so this will give you a portal of your found records. Since this is a global field, your different users can each produce their own lists in this global field without one user's found set showing up as part of the recors in another user's portal.