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

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

Recommended Posts

Posted

Hi there,

I've been looking at the posts regarding the multi-column sort scripts, and was wondering if that's what the sample databases use for sorting.

In filemaker pro 5.5, using the sample "purchase order" database, there is a list view in which you can sort by clicking the column headers. However, looking at the scripts and values, there is nothing similar to what has been suggested here (using getfield).

Anyone know how they work ??

Thanks !

Posted

The samples available with FileMaker Pro use the Table view layout.

These can have the column headers be clickable so that you can sort by clicking on any of the field names. Available from the setup for the layout, under the views tab, the table view has extra options.

This is different to the multi-column sort scripts.

HTH

Posted

Are you sure it uses the table layout ??

I've tried it myself, and it gives a very different result. Using the table view allows the columns to be moved, and right clicking on the titles gives me some sorting options, but what they have is different. It says "View as list" in the view menu (changing it to table gives me...the table view), and there are a bunch of scripts used to sort. Clicking once on a column title sorts it using it, and clicking once more togles the sort to Ascending/Descending (same as the table view that you mentioned). I've played around with the scripts, and they are bizzare (unless I'm missing something). For example, deleting the sort[Restore, No dialog], saving, and puting it back after prevents the sort from happening again...go figure.

If it is using the table layout however, how did they change the layout so much ?

Posted

OK.

So the sample you have has preset sorts configured.

If you delete the sort [restore, no dialog] and save the script then yes the sort will not work, as you have taken out the saved sort.

To put it back you have to do a manual sort, then go into the script and when you save it you choose to replace the current saved sort. Then the sort order is back.

Check the scripts attached to the table headers. They will probably be setting a field and checking what that value is. Then, based on that value running the ascending or descending sorts.

Posted

Ok...I think I'm starting to see what you mean by preset sorts.

So in their example, they made multiple scripts, and for each scirpt, manualy set a specific sort. Then by using their "sort" value, they know which script to run..?

In the script the sort variable is "HiliteSortedBy". From what I understood, it is used to choose the sript to run, and to display the little arrow next to the column header (it indicates either ascending or descending sort). What I didn't catch was how the sort new wich fields to sort, since it simply said "sort[restore, no dialog]". Does restore mean "put back the sort values that existed when the script was made" ?

If it is so, then why do some bother trying to make sort using getfield commands ?

I've attached the example so you can see what's going on...

Thanks a lot for your help & time.

Posted

Ok, I finally got it !!

It is indeed what you mentioned, preset sorts. Didn't catch it at first, and now, the whole thing looks sooo simple !

Off to a slow start, but getting there !

Thanks a lot for your help. As mentioned in another thread...any good book you'd suggest that has good examples/descriptions ?

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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