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.

Sorting in a portal

Featured Replies

I have a portal containing fields from self-join (for IWP purposes).

To sort a portal am I right in thinking that you can only do this from the relationship builder - in which case you can only sort the portal by fields contained in that portal? Or is there some to other way i can sort it?

thanks

Emma

Hi Emma,

If you double-click your portal (or right-click > Portal Format) you can sort your portal on ANY field listed in that table. It doesn't have to be a field contained in the portal. Unless I'm missing your point somehow, that should work fine for you. Let us know if you needed something else. smile.gif

Oh. IWP? I'm unsure if this makes a difference, sorry. Maybe others know.

LaRetta

  • Author

blush.gif humm oh yeah, feeling a little silly now - I had completely forgotten about that option.

However, I would need the user to change what the portal is sorted by, i.e. initially set to sort by supplier, they would want to change this to sort by section.

So is there a script step/steps that could do this?

Thanks

Emma

An easy, inelegant way to do this is to create multiple layouts, identical in every way except with differently sorted portals. This could be a maintenance headache....

Another way is to sort on a calculation field that conditionally outputs different results based on user input.

case (

global=value1,field1

global=value2,field2

etc.

)

by using a script to toggle values in the global field, you can toggle the values in the sorted calc field.

One caveat is that if you want to sort on date/time values they won't sort properly since you have to output all values as one type (text,number, date, or time) so you have to play tricks like padding the time and date results with 0's to get them to sort properly. Also, you can only sort in one direction (you can't reverse sort order dynamically)

There is a great example of dynamic portal dislplay on www.filemakermagazine.com

Dana

  • Author

Thanks for your suggestion, I would do it the inelegant way as they would only need to order in 2 different ways.

However, I have realised that the field I want to order by is actually a related field - therefore does not appear when you double click the portal and try and sort it from there.

Is there a way of sorting by a field that is related?

Yep!

Create a calculation field in the table the portal is based on, and simply have it calculate the result of the related field.

So if the portal table is X, the related table is Y, and you want to sort by field Z, the calculation would look something like:

Y::Z

Then sort by the calculation field -- oh, and I recommend not storing the calculation results, as I suspect it might throw things off when you make changes to the related table. The sort might take longer that way, but it should still continue to work correctly, and correctness is more important than speed.

This seems to be the same issue that's being discussed in thread "Portal sorting refresh problem".

FDE, I'm not quite following what you mean by Y::Z as a calculation.

Anyway, isn't this also going to result in an unindexable field that won't sort properly? (See other thread.)

Love to hear more about a workable solution.

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.