How to resort portal records
I have a portal with address records with column headings to specify the type of sort desired. I am using the approach of having a global stored gSortType field and a calculated text sortKey field in the table displayed by the portal. When I click on the column headings, I run a script that sets gSortTYpe field and sortKey changes properly for all records.
However, the display is not updated with the records in the new order.
The main table is HOA. It has a related table LOTS, and LOTS has a related table Homeowners. I am displaying a portal of Homeowners in a LOTS layout.
If I close the solution and restart it, then the records are shown sorted in the desired order. But I want them to be displayed automatically. Closing the window and reopening it does not change the display. I'm sure that's a clue, but I don't know what it is telling me.
I tried bracketing the sortKey change with Freeze Window and Refresh Window, but that did not result in any change to the display.
How do I get the portal to display the table records resorted according to the changed sort key?
I am using FMP 13 Advanced on Windows 7 and will later be running on a Mac.
I'd appreciate any advice.