Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

We're cleaning up our MOSS site collection in preparation for the migration to SP2010. As we work on the top root site of our site collection, we realize that some of these lists (often with invalid data) might be used as lookups (or otherwise referenced?) in web parts throughout the site collection.

Is there any way to determine this sort of dependency?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

There is no OOTB solution that I know of, but here is a way to get references using PS for one column:

$column = $web.Fields["Column Display Name"]
$column.ListsFieldUsedIn()

Reference: http://sharepoint.licomputersource.com/2010/12/find-what-lists-or-sites-are-using-a-particular-site-column

I tested this myself on a simple Contact->Customer Lists and this worked:

$web = Get-SPWeb http://localhost
$f = $web.Lists["Contact"].Fields["Customer"]
$f.ListsFieldUsedIn()
$web.Dispose()

Another more horrible solution is to look directly in the SQL, this will give you a overview of what Lookps reference, but it would be bad practice do do it this way.

share|improve this answer
    
Interesting. Unfortunately, PS is not an option for us. Also, site column would not be involved. But I hope this can work for others. –  mrbroschat Sep 13 '12 at 14:49
    
Is it possible with any custom code? This can also be solved with C#, even with a sandboxed solution you can upload to solution gallery –  eirikb Sep 13 '12 at 15:19
    
In theory you could also use any way of Client Object Model (JavaScript, Web Service), but I guess the support is lacking in 2007 –  eirikb Sep 13 '12 at 15:19
    
Thanks for the reference to SP.ListsFieldUsedIn. I'll try it with JavaScript/jQuery. –  mrbroschat Sep 13 '12 at 16:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.