Missing Lookup field when created using imported List template

During deployment of a Sharepoint 2010 site components I was  importing lists when this issue popped-out:

Missing lookup

It turns out that when you create list template with lookup fields it references the list’s GUID from source site and importing it to destination site the list GUID has changed and must be updated accordingly.

What to do now?

This won’t be a problem if you only have a few items on your list. You might as well delete the list and recreate them with the missing lookup relationships. However this may not be the best option if we are talking about couple of lists and columns with the same lookup.

I bumped into this blog by Adis and luckily managed my way around this issue by editing manifest.xml.

Inside the manifest.xml look for the <fields> tag you need to edit for all fields with type as lookup.

Modifying Manifest xml  

you can replace the List attribute by the new GUID in the destination site


 <Field ... Type="Lookup" List="{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}">

 

or use the List Name 


<Field ... Type="Lookup" List="Lists/NameOfListToLookup"/>

Few more guides

On editing .stp files and recreating them back to .cab formats I followed this blog.

And believe it or not I needed to google again inorder to find out how to replace .cab file back to .stp

Here:

      1. Open Folder Options, and click on the View tab
      2. Uncheck the Hide extensions for known file types box, then click on OK.
      3. Now the .cab extension at the end of the file is now editable.

 

 

One thought on “Missing Lookup field when created using imported List template

Leave a reply to How to Export a SharePoint 2013 List with Lookup Columns – a journey into software best practices with maria grazia merlo Cancel reply