One of the most common Alfresco customization requests that we receive from our clients is for a way to allow metadata constraint lists to be managed by business users, rather than by IT. TSG has developed an Alfresco Module Package (AMP) that allows picklist values to be managed using the data list functionality in Alfresco Share. See our previous post on Alfresco Data List-Driven Value Assistance for more information on this module.
This post will focus on recent enhancements to the Data List-Driven Value Assistance module to allow for cascading constraint lists.
Constraint lists have always been available in Alfresco content modeling to allow for users to input metadata using dropdown lists, rather than freeform text fields. Until the Data List-Driven Value Assistance module came about, the only way to add/remove/change the options in the dropdown list was to update the content model XML file, deploy, and restart Alfresco.
Another common problem is that many implementations require cascading value assistance. In other words, the available values in one dropdown list depend on what the user selects in another dropdown list. I’ll illustrate this cascading concept with an example:
I have metadata fields, Level 1 and Level 2.
Level 1 contains options “1” and “2”.
When I select option “1” for Level 1, the options for Level 2 are “Red” and “Orange”.
If I change Level 1 to “2”, the options for Level 2 change to “Yellow” and “Green”. This is cascading value assistance.
Alfresco Share currently does not support this cascading concept. To satisfy this common requirement, we’ve extended the Data List-Driven Value Assistance module to allow multiple cascading metadata fields to be driven from a single Alfresco Share data list. Installing and configuring cascading value assistance is similar to the original non-cascading implementation and requires the following:
- Install Cascading Value Assistance AMP packages into the Alfresco and Share web applications.
- Create a data list in Alfresco Share that will drive the dropdown options. The module provides data list types for non-cascading, 2-level, 3-level, 4-level, and 5-level cascading fields. The model can easily be extended if more than 5 levels are needed.
- Populate the data list with the options that should be displayed in your dropdown fields.
- Update the metadata forms in the Alfresco Share configuration to use the special dynamic controls. Each control is configured with the name of the data list that the values will come from, the cascade level, and the other properties that it depends on.
Because the data lists can be easily updated in Alfresco Share, there is no need for IT involvement or server restarts to update the constraints. This is a huge win for business scenarios that have constraints that change frequently. Also, because Alfresco Share has robust role-based security already built in, the value assistance data lists can be easily secured to only allow access to the appropriate users. Typically we see our clients create a separate site for “Alfresco Administration” and grant access to the proper individuals.