6 Replies Latest reply on Oct 23, 2012 5:56 PM by johnhorner

    Complicated Conditional Value List?



      Complicated Conditional Value List?


           i notice that this is a hot topic today...  i have looked at the conditional value list demos and understand the basic concept but i am at a loss as to how to extend this to my situation.  i have a products table and it contains fields for various things such as "price", "vendor", "product category", etc.  so far, i have created a global field (in a separate preferences table for now) with a pop-up menu which displays the primary filter category (e.g. "All", "Vendor =", "Product Category =", "Price =", etc.).  the values for this are a simple preset custom value list.  what i would like to do is to create a conditional value list such that if the user selects "Category", for example, from the first pop-up menu, the conditional value list will contain the field values from the "product category" field in products (this, will be a dynamic list as the user can create, edit, or delete the categories).  if however, the user selects "Price" from the first pop-up menu, i would like to display a preset value list (e.g "$0.00 - $50.00, $50.01 - $100.00, $100.01 - $500.00, etc).  so some value lists will be generated by field values, and others will be preset (ideally user defineable, but would settle for fixed custom list).  can this be done.  i think the last step, filtering the portal based on the two selections should be fairly straightforward...  any ideas much appreciated!

        • 1. Re: Complicated Conditional Value List?

               Here is a sample app. I modified the Invoice starter app to limit items based on category.  Also are you wanting to display items only in the select price range. 0-50,50.01-100.01?  You could do this a couple of different ways, most websites use sorts that shows from lowest price to highest or highest to lowest.   You could also setup a price value list and then setup a relationship based on the select price range and the price.




          • 2. Re: Complicated Conditional Value List?

                 thanks s chamblee for posting that sample file.  however, i think you may have misunderstood my question (or perhaps i didn't fully understand the solution you provided?).  i see that you are using a pop-up menu with a custom value list to sort the records and that you are using a pop-up menu with another custom value list to filter the records that are displayed.  but what i am trying to implement is, for lack of the appropriate terminology, a dynamic, conditional value list.  as i tried to describe, but perhaps not very clearly, i have a products portal on the products layout.  i am going to use the contents of 2 separate global filters in combination with portal filtering, to display only the desired product records.  the first global filter field contains a custom value list with values as described above (e.g. "All", "Vendor =", "Product Category =", "Price =", etc.).  if a user selects "All", then all the product records display in the portal and the second filter will be hidden.  if, however, they select "Product Category =" from the first filter, then i want the second filter to display a value list based on the contents of the "product category" field (e.g. "Jewelry", "Clothing", "Furniture", etc).  I want these to be the actual field values.  if however, the user selects "Price =" from the first filter, then the second filter should show the conditional values appropriate to that selection as mentioned above (e.g "$0.00 - $50.00, $50.01 - $100.00, $100.01 - $500.00, etc).  so i am trying to have a conditional value list for the second global filter that is capable of displaying either field values or a custom value list depending on the value selected in the first global filter.  based on the values in those 2 global fields it will be relatively easy for me to filter the records displayed on the portal.  but what i need help with is a method for generating the conditional value list for the second global filter.  does that make sense?  let me know if you have any ideas.  thanks!

            • 3. Re: Complicated Conditional Value List?

                   The first was a sample based on the category.  You select a category then only items related to that category are listed.

                   Here is another sample


              • 4. Re: Complicated Conditional Value List?

                     thanks for your reply and the second demo file.  i really appreciate all your help.  both of your solutions present what i would call a workaround to my problem in that they achieve essentially the same end result that i am looking for, but they have a fairly high overhead in so far as it requires a different layout for every value in the first value list.  there are approximately 10 values in my first list which means creating and maintaining 10 layouts using your method.  this does not seem like the optimal solution... imagine if there were 50 values in the list!?  i think there are probably scripted workarounds that may be preferable to this that grab all the values possible for the second global value list and then generate a traditional conditional value list based on that.

                     however, i was hoping someone would be able to come up with an elegant solution (1 layout), that could generate the conditional value list for the second global filter based on the value selected in the first global filter.  do you think this is possible?  thanks again!

                • 5. Re: Complicated Conditional Value List?

                       You wouldn't have to have different layout, but a different portals for each.  The different portal could but put on a tab control and each tab selected by script just as you would select different layout.  You could hide the tabs so the user doesn't know it on different tabs.  

                       I haven't seen a different method, that would be any easier to maintain.  Anything is possible.   

                  • 6. Re: Complicated Conditional Value List?

                         different portals is marginally better than different layouts but is still really cumbersome if i have to make a change it means replicating the work ten times over.  but at least it is an option if i can't figure out a scripted solution.  i am going to try making a conventional conditional value list and preloading all the different possibilities for the second global filter.  the trick will be updating the value list as the values (e.g. "Product Category", "Vendor", etc) are updated... perhaps not too difficult?  thanks again.  i really appreciate the input!