function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Christopher PezzaChristopher Pezza 

Create a multi Tiered Lists

So i am trying to build a 3 level list. to look something like this. This will also be an aggregation function to Count the total number of records. Any advice on how to build this? 

Product Line1
          Open - 20
          Hold - 10
        Open - 10
        Hold - 12

Product Line2
          Open - 3
          Hold - 2
        Open - 1
        Hold - 9

David ZhuDavid Zhu
I would try the following:
1. On custom object, create two picklists. Product Line and Stage. Create Controlling relationship (if needed)
2. In custom controller, create a list variable to hold the thrid level options (option value with aggregation)
3. In custom controller, create a method to populate third level options (ie. open - 20, hold -10)
3. Add two picklists on VF page using <apex:inputfield> component, bind "onchange" event to a Controller method (in step 3) through <apex:actionfunction>
4. Add <apex:selectlist> on VF page, bind to the list created in step 2.