Showing posts with label Lookup column. Show all posts
Showing posts with label Lookup column. Show all posts

11 September, 2012

Retain look up column values in export list template


It is known issues that on exporting list items, look up column values are lost.
If the list is very big, it might not be possible to fix that manually. This problem occurs since list template does look up on a table using GUID, on creating a list template and exporting to a different site, this GUID changes, hence it is no longer able to retain the values.


Suppose I have a list “Category” which has a look up column “sub category” which refers to list “Sub Categories”. I assume you have already created a look up listSub Categories” in the destination web.

  1. Browse to the source Web’s lookup list “Sub Category” and choose Modify settings and columns.
  2. Copy the source lookup list GUID from the URL.It should be a sequence of numbers and letters similar to:  %7BFFA47BF8%2D849C%2D4F20%2D9C50%2D173D2F5B6725%7D
  3. Browse to the destination Web’s lookup list and choose Modify settings and columns.
  4. Copy the destination lookup list GUID from the URL.Similar as point 2.
  5. Delete %2D from the string and replace with a dash sign (-). There should be no dash sign (-) at the start and the end. GUID should be in the following format: FA47BF8-849C-4F20-9C50-173D2F5B6725
  6. Save the source Web’s list that contains a lookup column “Category” to the lookup list as a list template called category.stp.
  7. Export the list template STP from the source list template gallery to the file system.
  8. Rename the category.stp file to category.cab so Windows can open it.
  9. Open the file, right click on the manifest.xml file and export it to the file system.
  10. Edit the manifest.xml file; find the source Web’s lookup list GUID and replace it with the destination Web’s lookup list GUID.
  11. Save the manifest.xml file.
  12. Open a VS.NET command prompt.
  13. Run the makecab command as: makecab manifest.xml category.stp
  14. Import the new STP into the destination Web’s list template gallery. You will need to delete it if it has previously been imported.

08 May, 2012

Cannot delete a Corrupted lookup Column from the list

Issue : Just Today i came accross a issue in Which the User had a List with many columns and One of the column Which was a look up column was corrupted

used to give a error "Unknown Error"

We were not able to Delete or edit the column

After a lot of research we found a work around to delete the Column

Checked the Url and found the below

/_layouts/FldEditex.aspx?List=%7B37920121%2D19B2%2D4C77%2D92FF%2D8B3E07853114%7D&Field=Product%5Fx0020%5FDescription

Which is a wrong url it should be

/_layouts/FldEdit.aspx?List=%7B37920121%2D19B2%2D4C77%2D92FF%2D8B3E07853114%7D&Field=Product%5Fx0020%5FDescription

Just remove ex from FldEditex.aspx => FldEdit.aspx

And you will be able to get to the inside of the column where you can edit or Delete the column .

Cause - Unknown