Dynamic values from different column within item?

Mar 26, 2012 at 11:58 AM

My scenerio is, I have a lookup list that contains two columns. Column one is region (europe, asia etc). Second column is country. So I have some data that looks like the following

Europe | UK
Asia      | China
Europe | France

I've added the SharePoint 2010 filtered lookup field to a different list. I want this column to only have the values of a given region. But the user would have made the choice of which region in the previous field when adding a new item. Therefore the lookup filter is dynamic depending on the users given value in the previous field.

Is there a way I can do this currently with this project?


Mar 27, 2012 at 9:23 PM

I've been thinking on this a good bit today and can't think of anyway to do it dynamically using two lookup fields (it could be possible if the query option allowed access to the other lookup field's value, but doubt that it does). I do have a workaround option to propose though:

1) Create a new site content type containing all of the columns for your list except for region / country.

2) Create one site content type based on the one you just created for each region, naming each for the region

3) In your new list, click on List Settings -> Advanced Settings and select Yes for Allow management of content types?

4) In List Settings, click on Add from existing site content types and select each of the new region content types

5) Create filtered views for each region in the lookup table

6) Create a new filtered column in each of these region content types, selecting the appropriate view for each region.

Now your list's Add Item button will have a drop-down with each region as an item type. When I did this for an application, I determined the url for adding each item type and created links in the navigation panel for each. This helps to get away from creating a new item using the default item type when a user clicks on the add item button rather than on the drop-down to select the type.