Workaround for Lookup field in SharePoint list templates

If you have ever tried to save a list as a template that contains a Lookup field for one of the columns, you have undoubtedly discovered that the template once implemented on another site will be unable to properly lookup a field for that column.  Instead the column will have to be deleted and recreated for each instance of the list.

Todd Bleeker has posted a cool workaround for this issue that can be used on a singular basis (it is not for solving this problem with custom created list definitions).  Thanks Todd!


01. Browse to the source Web’s lookup list and choose Modify settings and columns.

02. Copy the source lookup list GUID from the URL.

03. Browse to the destination Web’s lookup list and choose Modify settings and columns.

04. Copy the destination lookup list GUID from the URL.

05. Save the source Web’s list that contains a lookup column to the lookup list as a list template called [yourlist].stp.

06. Export the list template STP from the source list template gallery to the file system.

07. Rename the [yourlist].stp file to [yourlist].cab so Windows can open it.

08. Open the file, right click on the manifest.xml file and export it to

the file system.

09. Edit the manifest.xml file; find the source Web’s lookup list GUID and replace it with the destination Web’s lookup list GUID.

10. Save the manifest.xml file.

11. Open a VS.NET command prompt.

12. Run the makecab command as follows:

    makecab manifest.xml [yourlist].stp

13. Import the new STP into the destination Web’s list template gallery. You will need to delete it if it has previously been imported.

14. Create a new list based upon the new STP file.

The lookup column on the new list should retain all the data that was in

the source list.

3 thoughts on “Workaround for Lookup field in SharePoint list templates”

  1. Dear Heather,Do you know? Can you do proper lookup with a sharepoint list?eg. We have a “shipping quote” spreadsheet with simple list of customers, courier name and package sizes and a blank file for price.On another sheet per courier name we have a spreadsheet grid of countries in the first column and package weight in kg across the top with the intersecting cells filled in with the respective price.On Excel this is easy. Just look up the correct sheet based on the courier name. Then look down the correct sheet for the country as specified in the primary sheet and across to the right weight in the same way. Then return that price.How can we do this with Sharepoint Lists? the aim is to have all our little spreasheets on the intranet.You talk about entering code – by where do you enter code on the GUI.If, as readers of this post maybe wondering, I already have a spreadsheet that works, why not just upload the document to the site and all is well. True but then two problems: a) if client has Excel 2000 the spreadsheet opens in the browser but any changes cannot be saved (unless to a new file name and that uploaded separately – not practicle) and b) if client has Excel 2007, the saves are published to the sharepoint site but the spreadsheet will not open in the browser but only in the Excel application.In any event, the need for client applications of whatever versions, mean the system cannot be used say at an airport or where you just want to use the webI appreciate any help – thanks in advance

  2. I had similar problem – solved by adding another (default) contenttype to the list, deleting the original applied contenttype, adding it again, and removing the newly added default again. As in a Danish proverb; two steps forward, two backwards, but it worked?Can’t seem to delete my test lists afterwards though. Somehow the list is stuck in the contentdb or?

Comments are closed.