Sharepoint: Integrity of lookup fields after a list import

Posted by driAn on Stack Overflow See other posts from Stack Overflow or by driAn
Published on 2010-04-21T18:58:12Z Indexed on 2010/04/21 19:23 UTC
Read the original article Hit count: 461

Hi there

I got a question about the behavior of lookup fields when importing data. I wonder how the lookup fields behave when the list they point to is being replaced/imported. To explain the issue, I will provide a quick example below:

As example, assume we have these two sharepoint lists:

Product Types
-------------
+ Type Name
+ Code Nr
+ etc


Products
--------
+ Product Name
+ Product Type (Lookup field to list "Product Types")
+ etc

In my scenario, the Products List contains production data on the production Sharepoint platform. It is filled with data by the business users. However the Product Types list contains rather static data and is maintained by the developer.

Now after a development cycle, the developer wants to deploy his new webparts and his new data (product types list). The developer performs the following procedure:

  1. On the dev machine: Export "product type" list using stsadm
  2. On the production machine: Delete all items in the "product type" list
  3. On the production machine: Import the "product type" list using stsadm

This means we basically replace the "product type" list on the production server while keeping the "product" list as it is.

Now the question:

  • Is this safe? Will the lookup references break under certain circumstances?
  • Any downside of this import/export procedure?
  • What happens if someone accesses a "product" during the import? Will the (now invalid) reference clear its own content (become a null value).
  • What happens if the schema of the "product type" list changes (new column)? Will this cause any troubles?

Thanks for all feedback and suggestions!

© Stack Overflow or respective owner

Related posts about sharepoint2007

Related posts about import