Jump to content
Server Maintenance This Week. ×

Portal Sorting that Doesn't Suck


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

Recommended Posts

I hope some of you find this useful.

Blog post and sample file here:

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

Link to comment
Share on other sites

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 ?

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

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