4 Replies Latest reply on Oct 30, 2013 11:45 PM by petropix

    Conditional value lists-- is there another way?

    petropix

      Hello again--

       

      I have a Product table (FM-PROStarter Solution: INVOICES) that includes at least 4 Product Catogories, about a dozen Brands, and each Brand has several varieties/models, attributes etc. I need to create a GUI list of the Catagory/Brand Names and beside each name a drop-down field showing the MODEL list relating to the Brand. Do I need to make seperate tables for each Brand/Catagory-- or can I fish the relevant data out of the Main Product table? Also, once the Model/Item is selected in the drop-down, an adjacent Button must trigger/enter the selection into a Line Item on the invoice (adjacent portal).

       

      Any help in structuring this would be greatly appreciated.

       

      -T.

        • 1. Re: Conditional value lists-- is there another way?
          davehob

          I'm a little unclear whether Categories and Brands are the same thing, or whether a Brand belongs to a Category.  I'm assuming that there's a hierarchy of Category > Brand > Model, so these will be your tables.  In Brands, you'll have a foreign key back to Categories, and in Models you'll have a foreign key back to Brands.

           

          As ever, there are many ways to implement the value lists, but I would probably have global fields in Categories and Brands.  When the user selects a Category, set the gCategoryID global field to that key value.  Make a relationship from Categories to Brands using that global field, and use that for your value list, showing related values only.  Do the same for Models within a selected Brand.

           

          Once the user has selected a Model, you can populate the Model key in the Invoice Line Items record using Set Field, either via a button (as you said), or via a script trigger when the Model is selected (if you want less work for the user!).

           

          Hope that helps,

           

          Dave. 

          1 of 1 people found this helpful
          • 2. Re: Conditional value lists-- is there another way?
            jbante

            Once you have your relational model figured out, the Virtual Value List module can help you filter the items that appear in your drop-down menu without having to clutter your relationship graph with a bunch of single-purpose table occurrences.

            • 3. Re: Conditional value lists-- is there another way?
              petropix

              Thank you! Most helpful. There are a number of other variables involved, so a bit more planning to do before I attempt this-- will report back.

               

              cheers,

               

              -t.

              • 4. Re: Conditional value lists-- is there another way?
                petropix

                Thanks! I'm going to investigate this, the Virtual Value List module looks appealing, but need to do more homework first..

                 

                t.