views:

35

answers:

2

Hello!

I'm a MOSS 2007 newbie and am trying to find out where a view is used.

I have a larger list and i want to have two different views into that list. I've inherited the site collection, and currently there are three views, with two of them named almost identically. Now i'd like to find out if i can safely remove one of those views.

So the question is: Is there a way to find out all references to a view?

I'll provide additional information gladly!

A: 

What are you trying to do exactly? To get all the views of a specific list, use SPList.Views and load them in the SPViewCollection.

NLV
I have a web part that shows a view into a list. First part of my problem is that i'd like to find out which view this web part is using.Second part is that i have a set of views made from a list, and i should find out if some web part is using some of those views.
juarola
+1  A: 

"First part of my problem is that i'd like to find out which view this web part is using." "Second part is that i have a set of views made from a list, and i should find out if some web part is using some of those views"

A Web Part does not use a view directly. The current view of the web part is based upon a view, but if you change or delete the view, the web part still displays your list/library as before. Thus, if you delete your views, all web parts will still continue to function.

What you should probably do is compare your views (which fields are displayed, filtering, sorting, grouping, etc.) with each other and also with the view inside your web part. That way, you'll know which view was used before.

What could happen is that you break links to your view page. This is, if on some other page there is a direct link to your view.

Modery
Thanks, this is what i did. Quite a bit of work, but now i have some sort of a list about views and their usages.
juarola