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

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

Recommended Posts

Posted

Greets, all:

 

I have a portal where I'd like the user to be able to sort its contents based on a radio button choice: Date or Number. With Date, the contents would sort date-descending; with Number (a number that they would enter into a number field for each record (1...2...3...etc.)) the contents would sort number-ascending.

 

On the surface, a portal only allows one choice for sort order: ascending _or_ descending. Is there a way I can pull this off?

Posted

Ok. I think I got this one.  You can stack two portals one with each type of sort that you want and then use the new Hide object when calculation.  It could be based on global field that you set, something like

 

Hide on the portal set to date ascending would be

 

 $$sortPortal <> "Date Ascending"

 

like that.  You do not need to the portals in pop-overs or tab panels or anything since you use 13.  Your sort script would set this variable.  You get what I am suggesting, right?


Ok I have not tested this but I did something similar few weeks ago so I am pretty sure it would work.

Posted

On the surface, a portal only allows one choice for sort order: ascending _or_ descending. Is there a way I can pull this off?

 

And when you scratch the surface, you will find that a portal only allows one sort order ...

 

 

There have been methods proposed that sort a portal by a calculation field (or several calculations fields). These methods suffer from two major flaws:

 

1. They are slow (because sorting by unstored calculations is slow);

 

2. They are difficult to implement when the fields involved are of different types (the calculation field can have only one result type);

 

3. When implemented correctly with respect to #2, they become very slow.

 

The preferred solution is to use several portals, each with its own hard-coded sort order, and to select among them - either by using a tab control or by hiding, as suggested by Charity above.

 

Previous discussions:

http://fmforums.com/forum/topic/51649-portal-sorting/

http://fmforums.com/forum/topic/65794-portal-sorting-techniques/

Posted

Thank you both!

 

I originally thought of using two portals but the design of the layout won't accommodate two of them. (Yes, I know that design shouldn't drive function but in this case it does. The layout has a large, tabbed panel with portals on each "tab" and they each take up a large bit of real estate.

 

My Plan B was to clone the layout and use a script trigger tied to the Choice field so based the user's selection, the user is steered to that layout with the appropriately-defined portal.

Posted

Since you are on 13, don't forget slide panels. Slide panels are essentially tab-less tab panels.

 

See attached, note that the slide panel layout uses two panels, each with a separate sort order.

 

The data is dummy data, the file is a modified version of a template file.

Taborama.zip

Posted

I originally thought of using two portals but the design of the layout won't accommodate two of them.

 

Show me a screen shot of your interface and I will show you how to implement a multiple portal sorting solution without changing your design.

This topic is 3527 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.