Value List Sort Problem
Posted 26 January 2007 - 08:15 AM
This must be so easy it must be a no brainer...but Ive now spent 2 hours trying to do it to no avail.
I have one Table like this with two fields
sortorder and menutext like this
1 -nothing selected-
2 zzz Entry
3 aaa Entry
4 ddd Entry
I want to make a value list from the text items, but one that shows in exactly the order above.
I need the table so I can add in new menu items easily so I cannot use a straight "fixed value list".
I want my Value List to display like this when I click on my field:
it however displays:
all the time no matter what relation I create or if I show all values. How can I "order" my value list by SORTORDER WITHOUT displaying the field SORTORDER in the valuelist as well?
Surely this can be done no?
Candy is Dandy... But Liquor is Quicker
Posted 26 January 2007 - 08:38 AM
Take a look at this thread. You may be able to implement the technique for your solution.
* Edit Sorry misread post
Posted 26 January 2007 - 09:39 AM
I checked the link; theres no discussion of sorting value lists if I see that right...
did you point to the right link? How may that one help?
Posted 26 January 2007 - 10:52 AM
I used the fact that later versions of FileMaker now index spaces, so "_" sorts before "__" which sorts before "___", etc. (Assuming _ is a regular space.)
In your Values table set up a third, calculated fields that is simply a number of spaces equal to the sort number. The code for that looks like this:
Left(" "; SORT_NUMBER)
Just make sure you put enough spaces in to cover as many entries as you might add over the course of time.
Then for your value list, make it two columns...Use your VALUES first, and the SPACES second, and sort by the second column. The user won't be able to see the spaces when they select a value from the drop=down, but the spaces will control the sort order so it comes out the way you want.
I've included a quick sample solution, hope it solves your problem.
Posted 26 January 2007 - 11:02 AM
2. Instead of typing 100 spaces, consider:
Substitute ( 10^SortOrder - 1 ; "9" ; " " )
Posted 29 January 2007 - 12:28 AM
thanks for all these marvellous suggestions however; I had also actually already come up with exactly that solution...problem is though that I have about 250 values in the value list. Also, I think that the menu will get wider with many many spaces. In fact it will get too wide.
I find it hard to believe that with all the options that exist to sort value lists up and down and across the board, filemaker didnt think of this, that one really wants a custom sorted value list.
Filemaker: Why can we display one field, sort by the second, but only SHOW the first field please?
Anyone who has any other suggestions Id be very happy to hear them...
Posted 08 February 2007 - 06:51 AM
Thanks to all for your help!
Posted 23 October 2008 - 03:53 PM
Posted 16 October 2009 - 02:03 PM
Posted 16 October 2009 - 03:12 PM
Posted 16 October 2009 - 03:14 PM
Posted 19 October 2009 - 08:41 PM
As it stands, my example file does allow me to select a size from a correctly ordered value list, and then displays correct options from the conditional value list in the name field within the portal. What I cannot figure out is how to get the portal to sort in the same order as the value list, and to aggregate multiple name values for each size.
This model, which is quirky, is to allow users to describe something with checkboxes; this model would be useful if the user were asked to catalog types of fruit in a fruit bowl by size. I've attached the fp7 file as well as a mockup the desired output. Any assistance would be greatly appreciated.
Posted 21 October 2009 - 08:22 AM