4 Replies Latest reply on Jul 4, 2014 8:43 AM by philmodjunk

    Sorting Value List entries by field

    symbister

      Title

      Sorting Value List entries by field

      Post

           Hi, using FMP11

           I'm trying to display a field formatted as checkbox, using a conditional value list from another table, but want the entries to be sorted in a particular order (ie, not by language, as allowed in the Value List setup) 

           Is this possible? I've tried sorting within the relationship setup , but of course this has no effect on the sort order of the value list.

        • 1. Re: Sorting Value List entries by field
          philmodjunk

               What you want may not be possible with the typical check box group format.

               I can think of two approaches to try. The first may not work, the second will but requires a significant design change to your database.

               1) Set up two more fields in the table from which you draw values for your value list. Make one a number field, SortOrder and the other this calculation field: Substitute ( 10^SortOrder - 1 ; 9 ; " " ). Select Text as the result type. In your value list setup, select this field as "field 2" and select the option to sort your values on this field. With a dropdown list or pop up menu, this will then allow you to enter small numbers into the SortOrder field to specify an arbitrary sort order for your values. I don't know if this works with a check box group, you'll have to try it and see.

               2) Set up a portal on your layout where each value is a row in the portal. Set appearance values such that borders etc are invisible so that the fact that this is a portal is not visible. Set up each portal row with a button that adds the value from that portal row to your original field if the value is not already selected and removes it if it is. Use either conditional formatting or FileMaker 13's new "Hide object when" feature to set up what looks like a check box to provide visual feedback that a given value is or is not selected.

          • 2. Re: Sorting Value List entries by field
            philmodjunk

                 Ps. I forgot to explain that with option 2, the fact that you are using a portal to display your values allows you to then sort the portal into any order that you desire.

            • 3. Re: Sorting Value List entries by field
              symbister

                   thanks again Phil...I'll have to try this in a 'dead' copy off the server...

                   this is my current Value List definition, my display only uses Field 2, implying that I can't use your Option 1....but I will experiment with the portal option, and as we haven't upped to FMP13 yet, will have to be creative about hiding....

              • 4. Re: Sorting Value List entries by field
                philmodjunk

                     You can also open a small window with the selection portal in it if you don't have the layout space for a portal.