4 Replies Latest reply on Nov 10, 2010 8:07 AM by philmodjunk

    value list from multiple fields

    IvanYivoff

      Title

      value list from multiple fields

      Post

      Hi there,

      I have the following situation

      Fields "fabric_1", "fabric_2", "fabric_3" on my table "carpets" are all, well, fabrics. The input fields are drop-downs, so they can choose a fabric used previously, or input a new one if needed. Since the value list is formed by the values on that field, the new value will end up being part of the drop-down in the future.

      So far so good. The thing is, they are all fabrics, and it makes sense that if I input one kind in any of the three it would be available on the drop-down of the other two. If I base the value list on the values of each field, and I enter "Cotton" on "fabric_2" wont have it available on "fabric_1" until I enter it manually again there.

      Is there a way to create a value list from the combined values of the three different fields, so the drop-down on fabric_1 will have everything that was entered on fabric_1, fabric_2, and fabric_3? Without repeated entries?

      Normally I would create a select to that effect, but can't wrap my head about how to do it in Filemaker.

      Thanks and regards,

      I.-

        • 1. Re: value list from multiple fields
          philmodjunk

          Best approach is not to have three separate fabric fields, but to define a related table for this that you then put in your layout as part of a portal to the new related table. This way, you not only have a single field that is your souce of "fabric" values, but you can now have as many of these "fabric" entries as you need. You can check out the Invoices starter solution or download this demo file created by Comment to see an example of how this is done: 

          http://fmforums.com/forum/showpost.php?post/309136/

          Since it may take some work on your part to make this improvement to your system, here's a shot term fix for your immediate problem:

          Define a calculation field set to return text like this:

          List ( fabric_1 ; fabric_2 ; fabric_3 )

          Have your value list draw it's values from this new, indexed calculation field.

          • 2. Re: value list from multiple fields
            IvanYivoff

            Thanks!

            I had considered the portal option,but because of some usability concerns the control is not viable in that particular form.

            But the second fix should be what I'm looking I guess. Does "List" treat the fields in the same table as if they were "related" fields, hence listing all the values across the table for each field? I'm off to try it out.

            Thanks and regards.

            I.-

            • 3. Re: value list from multiple fields
              IvanYivoff

              It works. First attempt didn't work because for some reason it didn't allow me to check the indexing options, but on the second attempt they were enabled and everything works perfectly.

              Thanks and regards,

              I.-

              • 4. Re: value list from multiple fields
                philmodjunk

                I had considered the portal option,but because of some usability concerns the control is not viable in that particular form.

                What are your "usability concerns" here? I think it's highly likely that a portal to a related table is a much better approach here.