Jeep Watson Posted May 23, 2013 Posted May 23, 2013 For quite a while now, I've been trying to perfect a good List View sorting framework that would take a minimum of fields and scripts and be fairly portable. I recently saw one that Ocean West posted that hit almost all the needs. I had been using a script very similar to his, but Stephen took it one step further by abstracting the column header names. Instead of each header being static type, he created a sortfield calculation that calculated the button's name, sort direction, and sort indicator --- MUCH easier to move to a different table or solution. http://fmforums.com/forum/topic/69150-sorting-lists-sort-order-indicators/?hl=dynamc+sort#entry327786 The only drawbacks I found were that if the sort status changed, the indicator did not. Also more importantly, if you entered Find Mode, the calculated type in the headers disappeared. I played around with things and came up with a couple of solutions that work. I added a condition in the sortfield calc that If Get ( SortState ) ≠ 1 then the Indicators disappeared. As for the Find mode problem, I used an OnModeEnter script trigger that called a script called Set FieldNames that set a global variable ($$FieldNames) to a string that equaled the names of the sort headers. It was a little tricky to get the spacing correct --- trial and error with spaces. Then I placed the global on the layout exactly on top of the headers and used conditional formatting so that the global would only be visible in Find Mode. I also changed the color of the header for the sorted column with conditional formatting. I'm posting the file here for others to dissect and see if they can come up with a more elegant solution for the Find mode dilemma. I really don't like type stacked on top of type in layout mode --- it's so hard to read at a glance without moving something. It's also time consuming to format. My initial efforts were to try to add the conditions in the sort field calculation. That would be nice and tidy but I got zilch, nada... Any ideas out there?? Sort - JW.zip
Lee Smith Posted May 24, 2013 Posted May 24, 2013 Hi Jeep, Thanks for sharing your file. I just opened it, and I will dig into it in a few minutes. However, I see you used a hyphen in your file name, which is not is not a good practice, because it is an operator in FileMaker. You might want to review this site on naming conventions, http://filemakerstandards.org/display/cs/Overview
ozziggy Posted June 24, 2013 Posted June 24, 2013 Isnt it just sad that we have to go to huge lengths to put a simple indicator on a list. I am new to filemaker but this is by far the most frustrating thing i have yet to experience
Recommended Posts
This topic is 4169 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