July 21, 200223 yr The desired capability: To have portal records resorted by clicking on portal column headers. I've already implemented my own solution. The reason I'm posting this is because I'm confused by all the solutions to this problem I'm seeing out there in Filemaker land. I haven't seen anything as elegant as what I've done and I'm just wondering why some of the solutions I've seen are so complex and bulky. My solution: 1) Create a field called 'portal sort number' in the file that your portal looks into. 2) Define your portal to sort on 'portal sort number'. 3) Attach portal header text for column X to a script that sorts your file on field X then loops through all the records in the file setting 'portal sort number' to status(CurrentRecordNumber). That's it. Click on column X and your portal resorts on field X. I've seen scripts 100 lines long for accomplishing exactly the same thing. Am I missing out on something? What I REALLY wanted to do was just have 'portal sort number' be a calculation field set equal to Status(CurrentRecordNumber). Then even the looping script would be uneccesary. Alas, this doesn't work - not quite clear on why it doesn't work. Better yet, wouldn't it have been nice if they made the special Record Number field available for portal sorting. Then you wouldn't even need the 'portal sort number' field at all.
July 22, 200223 yr Have you tested this in a multi-user environment? What if two or more people are viewing the same portal? I think it would re-sort the others portal!
July 22, 200223 yr Trevorg is correct: it's a great solution for single-user, but might not work well in multi-user. The most reliable, robust (and easiest) method is to create multiple relationships, each with the desired sort. Create a different layout each with a differently sorted portal: the sort buttons really switch between layouts.
Create an account or sign in to comment