Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How do I Sort a Portal o Order of value-list?

Featured Replies

Hello,

I have a portal, which already has some filtering in it - you click the column header and it will sort the portal by that column (only ascending at the moment). I also have a popup-list above the portal, which allows the user to pick their name, then click a button [Filter] to show only the records which were created by them.

Well, now I need to sort the portal by the status - so, there is a status column, and I click on the title of the column and it's sorted based on (the tricky part) the order of a value-list. The list is status: (Open, Closed, Pending); so when they click the title of that column, they will see the order showing n Open records; m Closed records and p Pending records.

What's the trick to getting this to work?

thanks,

J__

How about defining a compound field, createdby_status, and sorting by that?

  • Author

Thanks for the response.

What do you mean by a compound field?

I have a self-join on a projects table and that join has for it's sorting I selected a field, which i then set to a name when user clicks on one of the titles of the fields in my portal. So, i already have the sorting field taken ... and also how would the projects table know to sort in teh order that the value-list (which is always teh same order) ?

if you know of any examples, that would be helpful too. I guess I wasn't searching the right way but I looked high and low and could not find a sample.

thanks,

sincerely,

J__

  • Author

Soren (sorry my keyboard doesn't do the o with / in it. )

Thanks for the reply (and other replies!)

thanks for the links I will check them out.

Just so I'm being clear (I'm trying to !) .. there is a column in the portal called "Status"

the portal should sort based on the order of a value list - or i guess a table might be an option ;

The value list is (Open ; Pending ; Closed )

so if there are say 3 open records ; 2 pending and 5 closed

all the closed records appear at the bottom of the list in the portal.

I took a look at these and none of them address the problem that I am trying to solve.

thanks for your help. I did find a sample in there that is handy for something else though (grin)

sincerely,

J__

If your value list has those semicolons in it, it will not work. It should look like

Open

Pending

Closed

In the portal's definition, set it to sort based on Status, with 'Custom order based on value list' "Your Value List" selected.

Hi,

A calculated field that give an "a", "b", "c" value to the record given the custom value list would be another solution, if as I understood, J_ already had some other dynamic sort defined for this same portal, probably using a sortkey field.

So should it be understood so that the remaining fields sorts alfabetical/numerical order, but this particular field has it's own valuelist dependable sortorder? Thats indeed a tough one to solve, but take an extra look how dates was corrected into alfabetical sortorder in:

http://www.filemakerpros.com/SortPortMul.sit

http://www.filemakerpros.com/SortPortMul.zip

Ugo is right what's important is not the sort on the valuelist but on the status as it's position is found in the valuelist, so Open is subtituted with "a" and Pending is substituted with "b" etc.

--sd

Hi,

It is generally tough job to sort on a calculated sortkey field, specially when the values should use other formats. It happens here, but also in any instance or you'd like to sort numbers through a text key field.

My way of doing it is to use a value list for the portal headers, and to use special flags so that to know what should happen.

You can see a demo on the Download section of this Forum too, called Portal Sorting, that sorts, with one field only, either ascending or descending, either text, date, hour, numbers, and numbers, hours, date entered as Text formats...

Ciao.

  • Author

Thanks to all for response.

Queue - I was merely putting in the semicolons to illustrate in the posting - sorry about that.

Yeh, want to sort the portal by the value-list. Like doing sort step on a table where you can say "custom sort" and pick a value-list. I'm sorry I didn't know the right terminology to make it more clearer to you guys what I was trying to do.

Ugo - I have seen your sample on sorting with the value list used for headers of the portal - very nifty.

The problem is that I want to sort the portal using the value-list to specify the sort order.

So I have a column called Status and the value list has the following items in it (ignore semicolons) [ 'Open' ; 'Pending' ; 'Closed' ]

So, when I look at the view, all the 'closed' items in the portal will be at the bottom and the Open and Pending will always be closer to the top. It' not ascending or descending it's the order of that value-list.

thanks to everyone for your help and ideas. I really do appreciate it.

Sincerely,

J__

You need to convert your "specialized" sort order into a list filemaker can interpret and sort correctly.

Try a new calculation field:

Case (status = "Open", 1, status = "Pending", 2, status = "Closed", 4, 3)

Then sort on the calculation field.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.