Cascading Lists

There are many special kinds of metadata that an administrator can elect to use within EnterMedia. One example is a cascading drop down list. In this type drop down list the selection made in the top level would trigger specific results in a lower level list. One situation where this feature could be useful would be the months of a year being the top level list and the number of days acting as a dependent. The secondary list for some months would show 30 days, others would have 31, and February could be set to 28, or 29 for a leap year. Creating this kind of field can be achieved through the Data Manager. First, go to Settings and select the Data Manager from the side menu. Click Create New Table and then name the primary and secondary tables that will eventually become lists. Note: It is important to start with tables rather than fields so that you can create a third column that will link the lists together. Cascading - New Table Define the two or more tables that you want to use. For example: toplevel and secondlevel. Verify that each table has an id and name column. Add a column to the (secondary) table that is labeled with the same name and ID as the (primary) where both table names reflect the tables that were created in the first steps. Note: it is important to use the same name of the table as the field id so it is consistent. Cascading - Second Level   Cascading - Second Level 2 Navigate to the asset table and add (primary) and (secondary), again matching the ID's and labels that were created earlier. Edit the field (primary) and (secondary) by changing the data type to be List. Go to the asset table and select the (secondary). Under Advanced Settings change the Foreign Key ID to be (primary). Note: Foreign Key ID is a reference within the asset table. Cascading - Adding Field   Now that the the lists have been created you can add them to views by going to Settings | Asset Settings | Views | Editing | General | Add New | (primary) and (secondary). When you choose a category it will filter the list of sub categories. This should also work in the Advanced Search area. The lists must be set up with predefined results before the feature is ready for use. Note: Custom Render Types can also be created by a developer to give you more control on how these boxes work and look. Also, listid's may be used as well as long as the largest list has a Column ID that matches the Foreign Key ID. When finished, the feature should work like this: Cascading - Example