Dan-A Posted November 23, 2004 Posted November 23, 2004 Hi All, If i have a layout where users select various column heading to sort data (headings are buttons that trigger a sort script step)... I would like to be able to add to a sort... If the user opted to sort by company name, i would like to add "sort by date" to that users sort. Can i "get" the last sort criteria & add my own to it? Thanks Dan
Fitch Posted November 24, 2004 Posted November 24, 2004 You can workaround this by running a script that sets a global field to some value when you click the original sort button, e.g. set it to "Sorted by Company Name." Then when you click the button to add a sort, it would run a script that says, if the global = "sorted by comapany name" (or whatever) then sort it by name and date. FileMaker 7 does allow you to have multiple sort orders in a single script, so all your buttons could run the same script, passing a script parameter so you know which one was clicked. So the script would have a bunch of If/Else If statements, testing for the parameter and for the value of the global.
Dan-A Posted November 27, 2004 Author Posted November 27, 2004 Thanks for the reply... Do I understand correctly?? What you are saying is to have a bunch of sorting scripts that have my "combined sort" and based on the condition of a field ( let's say: gt_sys_LastSortName ) decide which of the combined sort script to execute. So that if the user last sorted by date, i can check for the last sort and run the script that sorts "company & date". In my case that's too many combinations.... I will work on limiting the sort options, my guess is that users will only use a couple of options anyway. Too bad there is no way to define a sort on a field that contains the value of of a field or fields I would like to have sorted. ( someting like: Sort gt_SortingCriteria where gt_SortingCriteria contains: Date, CompanyName ) Dan
Recommended Posts
This topic is 7304 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 accountSign in
Already have an account? Sign in here.
Sign In Now