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

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

Recommended Posts

Posted

I hope some of you find this useful.

Blog post and sample file here:

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

Posted

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.

Posted

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 ?

Posted

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!

Posted

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.

Posted

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...
Posted

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

Posted

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.

Posted

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

  • 2 weeks later...
Posted

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

Posted

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.

Posted

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.

Posted

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

Posted

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

Posted

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 New...

Important Information

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