Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Resorting portals by clicking on column headers


This topic is 8162 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted

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!

Posted

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.

This topic is 8162 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.