The Connected Systems Hierarchy Lookup for SharePoint 2010 is a custom field control added to your SharePoint Farm to allow every site collection to utilise the benefits of concatenating a set of filtering lookup fields.It supports an unlimited number of related lists and returns additional lookup values that can be displayed dynamically on the destination list views.
Using the Hierarchy Lookup Field Control
Once installed, the Hierarchy Lookup field is available to add to your list. Given this solution is a globally deployed field control, the configuration of this control occurs when a column is added to a list.
Enter the field name of the based item or destination item filter you would like to use to filter the second lookup. For example, if you wanted to filter the Suburb name based on the Region, Suburb would be the first or base item.
Select any other lookup values to retrieve from the source list. These will be added to the destination list as lookup fields. These fields are prefixed with the list name to identify which fields are read-only lookups from another list.
Select the Add Level button to create the filtered item or category by which to filter the destination field. In the example, Region filters suburbs to be displayed so Region is the next filter.
The hierarchy lookup uses the relationships in SharePoint lookup fields to offer only the related lists based on the destination field selected. This makes it easy for the user when configuring this field control.
Select the column name or display field, this will make up part of the concatenated hierarchy lookup field. Repeat steps for any subsequent related lookup lists.
Please Note – the hierarchy lookup field uses the lookup relationships in SharePoint to relate and connected field relationships.
Viewing the settings and additional lookup fields
Once the hierarchy field is configured, you can check the configuration and see howadditional fields are treated within the source list.
On the List tab | List Settings, the following screen will appear.
As displayed, the fields have been added as:
- CS Hierarchy Lookup field: This is the custom field that concatenates the filtered selections into one field.
- Lookup field: This is a read-only lookup field that returns the value of the list field being looked up. The list reference is a prefix to the field name to help distinguish where the information source list is.
You may change whether these fields are part of the default list view. As displayed, the fields can be removed or re-ordered.
Using the hierarchy lookup field
Please note: When adding the field to the list the configuration sets the destination field first with the parent or filter fields defined subsequently. However, when using the field during an add or edit function, the field order is reversed so the parent filtering may return the source field list and lookups for selection.
In our example, the State and Region and rendered first to allow the filtering of Suburb data. State is selected, then Region is selected (filtered by State).
Finally the Suburb fields are filtered and available as the last filter in the hierarchy lookup. The selected suburb will determine the associated lookup field data to be returned.
After entering in the suburb, the list view will show the value as “parent > parent > child” and all lookup field will be displayed in the list view as read-only lookups.
In edit or view mode, the fields are listed vertically on the edit/view form.
Please note that PostCode field is a read-only lookup to the Suburb list and is not stored in the destination list, simply referenced. If the Suburb selection changes for a Customer, the PostCode will automatically change to be the correct Post Code for the Suburb selected.