Coldfusion 9 Sharepoint Integration - ViewCollection

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 Collection

As 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:

<cfsharepoint action="getlistcollection"

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 Next

Getting 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.

Happy Coding...

1 Comments to "Coldfusion 9 Sharepoint Integration - ViewCollection"- Add Yours
David's Gravatar Again, as with your other examples, when I run this I get "The action getlistcollection requires no parameters." Also, you params is missing a quote and a curly at the end. params="#{listName='{A3EA94F4-9F1B-43A0-B197-085BA1E258C9}#"/> should end like this ...1E258C9}'}#"/>. Can you clarify why I'm get this CF error? CF9. Thanks.
# Posted By David | 5/13/11 9:28 AM

Powered By Railo


Subscribe via RSS
Follow garyrgilbert on Twitter Follow me on Twitter
Or, Receive daily updates via email.


adobe air ajax apple cf community cfml coldfusion examples ext flash flex google javascript jquery max2007 max2008 misc open source programming railo software technology ui

Recent Entries

No recent entries.


An Architect's View
Rey Bango

Wish List

My Wish List