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.

Featured Replies

I hope some of you find this useful.

Blog post and sample file here:

http://www.fitchandfitch.com/2011/05/filemaker-portal-sorting/

This is interesting. I like the sort respecting the data type of the field (you could also sort by more than one field). Don't forget you need to re-populate the global upon modifying/adding portal records.

Well done, Fitch !

But I have two questions regarding the Custom sorting...

1) Why it works with 10 and NOT with 9 ? ( I didn't find any particular v.10 feature )

2) Why it doesn't work with the script debugger activated ?

  • Author

Don't forget you need to re-populate the global upon modifying/adding portal records.

Good point. The example file is very basic. In real-world use I tend to avoid using portals to create records during data entry, but I wanted to make it easy for people to play around with the example data.

Well done, Fitch !

But I have two questions regarding the Custom sorting...

1) Why it works with 10 and NOT with 9 ? ( I didn't find any particular v.10 feature )

2) Why it doesn't work with the script debugger activated ?

Thank you very much!

1) I only tested in FM 11, but as you say it should work in 9. I don't know.

2) I am able to custom sort with the debugger on.

Please let me know if you figure it out!

Please let me know if you figure it out!

This appears to be a FileMaker bug ( may be fixed on 11 ? ).

If I put a Custom Dialog with $custom ( after the set $custom variable step ), the whole script works; but w/o the dialog doesn't.

I tried to set the $custom to evaluate as a number, with no avail.

I'll try other ways and let you know.

I've developed a virtual list based sorting technique that has some similarities. Will try to put up an example sometime soon.

  • 2 weeks later...

Attached is a virtual list based mod to the technique. An advantage is that you have a single sort script that you pass a field name to using getFieldName().

You can also reverse-sort and with some effort do multicolumn sorts.

PortalSortingVL.fp7.zip

  • Author

Nice one -- thanks, Bruce. I'm planning a followup article and would like to include your file (with attribution of course) along with a couple of other mods I've received, if that's all right with you.

That would be great, thanks. I need to make a few more mods but the basic idea is already there.

  • 2 weeks later...
  • Author

Bruce, it seems like the file you posted relies on the child IDs being consecutive and starting with 1. Am I missing something?

Bruce, it seems like the file you posted relies on the child IDs being consecutive and starting with 1. Am I missing something?

You're not missing anything except that this was a quickly thrown together proof of concept. The problem is easily solved. For the moment - left to the reader to do so.

  • Author

Bruce, you're killing me! ;) I am wrapping up my followup article, but without your file. If you have time to "easily solve" this, awesome, if not it will give me an excuse to write another article.

Bruce, you're killing me! ;) I am wrapping up my followup article, but without your file. If you have time to "easily solve" this, awesome, if not it will give me an excuse to write another article.

I will be posting about this in the near future myself. But here is a basic revision!

PortalSortingVL2.zip

Hi Bruce,

May be I missed something. In your file, when there are empty value in Sales, the sorting does not work when sort descending

You are correct. It's a demo. It's a solvable problem but the level of rigor and completeness put into demo files varies.

  • Author

I suppose you'd "pad" the list with zeros (or something -- would need to account for negative numbers).

I dig what you've done Bruce, but for now I will stay with the (relative) simplicity of my original approach.

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.