In my last post on the CFSharepoint tag and ListCollections we connected to a Microsoft Sharepoint server and using the ListCollection action of the CFSharepoint tag we retrieved a collection of all the lists available to the user.
In Sharepoint each list can have multiple views associated with it that show different meta-data for the list items. If you plan on integrating Sharepoint it is a good idea to provide the user the ability to choose the meta-data they want to view. In order to do this you need to allow them to choose the view.
View CollectionAs I mentioned above the view collection is simply a collection of the views associated to a particular list.
We get the view collection for a specific list like this:
As with the listCollection a structure is returned with two keys: ResultFlag (which should be SUCCESS) and a views key which holds an array of all the available views. The screen-shot below shows the dump of all the views for my list. To save space I collapsed all but the last "test" view.
The important parts here to save is the DisplayName, which will help the user identify the desired list, and the Name which contains the UUID, which you will need in the next step.
Whats NextGetting the viewCollection allows you to provide the user a means of selecting a list view. The list view in turn indicates what columns of information should be returned with the list items. Using CAML you can limit the meta-data based on the fields indicated in a list view.
Next we use the getView method to return the columns in our test view, and build a CAML filter to pass to the getlistitems action. If you don't specify a filter you will receive all available meta-data.
No recent entries.