11 Replies Latest reply on Jan 3, 2017 4:47 AM by hjgunn@mmedia.is

    Problem with sorting in a drop down list

    hjgunn@mmedia.is

      I have a field that I use to create a dynamic drop down list.

       

      It Contains values like:

      Beidni

      a

      b

      c

      d

       

       

      When I display this content in a drop down list it displays as:

      a

      b

      Beidni

      c

      d

       

      What can I do to fix this?

      Besides doing something like "xBeidni" and have it display at the bottom or top that way.

       

      TIA

      Hans

        • 1. Re: Problem with sorting in a drop down list
          beverly

          are the values in a field that is used for the Value List? if so, they will be sorted alphabetically. there are techniques that will try to sort these as you desire. you may search for 'filemaker sorted valuelist' here and in your favorite search engine.

           

          if the values are in a custom list, then they appear as you enter them.

           

          beverly

          1 of 1 people found this helpful
          • 2. Re: Problem with sorting in a drop down list
            David Moyer

            Hi,

            sorry - I backed out of my last workaround answer after reading your last sentence.

            Is the purpose to pick from a, b, c, or d under that heading "Beidni"?  Or is it to choose amongst the five options?

            • 3. Re: Problem with sorting in a drop down list
              beverly

              you backed out too soon! I read it as "Beidni" was one of the values. your " Beidni" would make it sort to the top, but the value would include the space. So if the value is needed for a match (relationship or find), then the entry can

              Trim(self) // in the field)

              or use a trigger to clean up after selection.

               

              The problem with sorting schemes is the loss of type-ahead so often used.

              beverly

              • 4. Re: Problem with sorting in a drop down list
                philmodjunk

                Often, an acceptable work around is to set up a "value selection portal" inside a popover. The popover reduces the footprint to that of a typical drop down list or pop up menu, but using a portal (where each row both displays a value and functions as a button to select that row's value), enables you to employ a great many different sort options--including sorting on a field not displayed at all in the portal.

                1 of 1 people found this helpful
                • 5. Re: Problem with sorting in a drop down list
                  richardsrussell

                  Depending on how mission-critical this drop-down list is, you might want to consider a more elaborate (and thus more effortful and space-consuming) way of going about it, namely a sortable portal with a "Set" button in it to transfer the desired value to the desired destination. Here's one that I put together for a veterinary application. This is the main table for breeds (in this case, with cats selected):

                   

                  Breeds Table.jpeg

                   

                  Notice that I've got a checkbox (containing only the value 1, not displayed) under the heading "Favored". I can check this box for any breed that's common enuf that I want it to bubble up to the top of the pick list that's displayed elsewhere in the file, like here in the "Specimens" table:

                   

                  Breed Picker.jpeg

                   

                  For this particular record, there already was a primary breed designated, so clicking the "Set" button on a different line will set the secondary breed and also check the "Mixed Breed" option. (You can do lots of things with buttons besides merely make a selection.) The "Favored" breeds are displayed at the top of the list because of the way I have the portal sorted. (I've also highlighted them with a yellow background.) The "See" button will take me to the "Breeds" table, where I can add more info to a particular breed if I'm so inclined. The "Favored" checkbox also appears on the far right of this portal, so I can convert certain breeds to "Favored" on the fly if I'm so inclined.

                   

                  PS: I subsequently read Phil's comment about using a popover to save space and endorse it. The example I showed above was created some years ago, and I've never gotten around to popoverizing it.

                  1 of 1 people found this helpful
                  • 6. Re: Problem with sorting in a drop down list
                    beverly

                    +1 on this. when the value list is not small and does not use static, pre-ordered, custom values - my preference is a 'pick-list' (portal) for the reasons stated so well by Phil!

                    • 7. Re: Problem with sorting in a drop down list
                      philmodjunk

                      For multiple working and carefully documented examples of enhanced value selection methods--which either do not use a value list or where the value list is just part of a larger tool, see:

                       

                      Adventures in FileMaking #2-enhanced value selection

                      1 of 1 people found this helpful
                      • 8. Re: Problem with sorting in a drop down list
                        hjgunn@mmedia.is

                        Thank you Beverly

                         

                        For this case I ended up putting a space in front of the word.

                        At earlier occasions I created a specific table to store all my value lists but here it would have been an "overkill".

                         

                        Also I don't get it that FM has to mess with the order of the items displayed.

                        I used a process to create the value list inside a field located in the current record with separators and all but due to this  limitation in FM this method is simply useless.

                         

                        Also I think it might make sense to allow a value list to display values from a variable?

                        And without changing the order they are stored in the variable.

                         

                        Hans

                        • 9. Re: Problem with sorting in a drop down list
                          beverly

                          I would *love* the option of displaying values in the order entered from a List(), variable with return-delimited values, field (single or multiple), etc. without the need to put them into the Value List dialog in that order. <sigh/>

                           

                          beverly

                          • 10. Re: Problem with sorting in a drop down list
                            hjgunn@mmedia.is

                            Thank you people.

                             

                            Many of the things you propose I have already used except I admit I haven't used a popover to save space, yet.  :-)

                             

                            In this case I was simply trying to get a list of values to be displayed in the same order as it was created by a process that runs while initializing the window.

                             

                            As I said earlier I ended up adding a space in front of the word.

                            I do use patterncount to extract the value so a space or whatever doesn't make a difference.

                             

                            I do wish though that FMI would allow us to display values from a single record / single field "as is". It would allow for a bit of nice, simple value list creation.

                             

                            Kind regards

                            Hans

                            1 of 1 people found this helpful
                            • 11. Re: Problem with sorting in a drop down list
                              hjgunn@mmedia.is

                              David you shouldn't have backed out. I ended up using this method.

                              For this particular solution it was just the correct one as FM scrambled up my "fine" sort order.  ;-)

                              Hans