3 Replies Latest reply on Dec 18, 2009 8:19 AM by philmodjunk

    Conditional value lists part deux

    kirvis

      Title

      Conditional value lists part deux

      Post

      Hi all,

       

      As a follow up from my conditional value lists do not work on conditional value lists, I have another slightly more complicated issue.   

       

      I now have a functional system where I can add products and select the category and related (sub(sub))category. What I would like to do now, is create an order, and add products to this order that I select from a value list. Because the number of products will eventually be quite large, it would be nice to have a conditional value list for products.

       

      In the order layout, I have created a portal from the "order_line_items" table, where I can select the (sub(sub))category first. After doing this, I would like to be able to select a product based on the previously entered categories.

       

      Since I still do not quite understand the theory behind the creation of conditional value lists, I do not seem to be able to create a functional conditional value list for products.

       

      I have placed the current file here, it is called "conditional value list.fp7". The other file is a previous version without the order tables.

       

      Hopefully someone will be able to help me with this.

       

      Kirvis 

       

       

        • 1. Re: Conditional value lists part deux
          philmodjunk
            

          Kirvis,

           

          This is basically a replay of where you had trouble the first time around.

           

          When I tested the value lists by entering values for a new line item, each value list worked except the last one. When I traced everything back to the Relationship graph, I had to change one table occurrence to point to a different data source table and then it worked. (I also had to create a new product record that matched the specific sub sub category I happened to select during testing. (I needed an "Electronics/Audio/CD Player" product.)

           

          In your relationship Graph take the Table Occurrence in the very bottom right corner and set it up to refer to your Order Line Items table and matches the values like this:

           

          Products 20:: Products_Sub_Sub_CategoryIDFK = Order_Line_Items by SubSub:: Product_Sub_Sub_CategoryIDfk

           

          Why it didn't work before:

           

          You are entering values in the Order Line Items table. Thus, one table occurrence of each pair used to define the relationship in your conditional value lists must refer to this table in order for the values you enter to be used to produce the list of related values.

           

          If you haven't read this post already, it might help:

           

          Many folks get confused over the terms Table and Table Occurrence. To learn more, click the following link:

          Table vs. Table Occurrence (Tutorial)

          • 2. Re: Conditional value lists part deux
            kirvis
              

            Hi PhilModJunk,

             

            Thanks again for your help! This and a Custom Value List? of you finally made me grasp the theory behind conditional value lists a little more. Your comment about placing a portal on a layout and using that relationship made me realize that for every conditional value list I need to define this new list in the relationship graph.

             

            Thanks again!

             

            Kirvis 

            • 3. Re: Conditional value lists part deux
              philmodjunk
                

              "...using that relationship made me realize that for every conditional value list I need to define this new list in the relationship graph."

              Unless you already have a relationship in place that will serve. :smileywink:

               

              That said, creating additional relationships solely for a conditional value list may be a good way to avoid confusion in your database design. The "portal test" is a good way to tell if you've got your relationship and field values set up correctly. If you can display the related records in a portal, then your conditional value list can use the same relationship to display a value list drawn from the same group of records you see in the portal.

               

              Many folks get confused over the terms Table and Table Occurrence. To learn more, click the following link:

              Table vs. Table Occurrence (Tutorial)