4 Replies Latest reply on Oct 22, 2013 5:01 AM by sasilk

    Multi-value selection fields

    sasilk

      Hi,

       

      I've done some searching and think I may have fallen into the terminology problem - what I'm searching for is called something different in FMP than what I call it.

       

      What I need to know is how to set up a drop-down list, so that the user can select more than one option for storage in the field data. For example, a product may belong to one or more Categories, and I want it to display under each selected Category in a sorted list.

       

      I'm used to calling these multi-value fields - what are they in FMP? And how do I create one?

       

      (As part of my learning curve, I'm trying to modify the Product Catalog starter to allow for multiple categories per product, so examples based around that would be much appreciated.)

       

      Stephen Silk

        • 1. Re: Multi-value selection fields
          erolst

          sasilk wrote:

          I'm used to calling these multi-value fields - what are they in FMP?

          A bad idea!

           

          What you want here would probably be a checkbox with a value list, but FileMaker is a relational database – if you want to assign multiple categories to a product, create a child table of ProductCategories, related by the primary key of Products.

           

          It's OK to use so-called multi-value keys in UI processes or for meta-data, but you shouldn't store your business data in this manner. Imagine trying to create a report of Products by Category, and you see the first of many problems …

          • 2. Re: Multi-value selection fields
            sasilk

            Thanks for the help.

             

            Curiously, with my usual platform that report would be child's play. :-)  That being said, it's a flat-file system that can fake relational.

             

            It's the UI side of this that I'm having the trouble with. Checkboxes won't work, firstly because of the number of categories and secondly, because the categories themselves will change over time. A probable minimum of 60-70 checkboxes would be a nightmare from a layout point of view, especially when the number isn't fixed or known ahead of time.

             

            I'm thinking that either using a Value List or a calculated lookup of the current categories to initially populate the drop-down is the way to go, storing the selections in a related table (as you suggest), but I have no idea how to actually create a multi-select drop-down in the first place.

             

            Thanks!

             

            Stephen Silk

            • 3. Re: Multi-value selection fields
              erolst

              I meant that you were probably thinking of checkboxes – not that it's a good idea to use them here.

               

              To see how to implement a UI for selecting categories and creating child records (and having a proper structure in the first place), see this example file.

              • 4. Re: Multi-value selection fields
                sasilk

                Ahh - sorry, I misunderstood you.

                 

                Thanks for the example file - I'll have a look and see what I can learn.

                 

                 

                Stephen Silk