SharePoint integration web parts

Web parts for connecting to SharePoint are stored in the Microsoft SharePoint category of the web part catalog:

  • SharePoint data source
  • SharePoint datagrid
  • SharePoint datalist
  • SharePoint repeater

The following text contains information about the properties of these web parts.

SharePoint

All web parts in the Microsoft SharePoint category have the following properties:

  • Mode - determines what the web part does (what data is retrieved from the SharePoint server) and therefore which web service should be used.

  • SharePoint site URL - specifies the URL of the SharePoint site that should be used. Based on the value of the Mode property, the full URL of the required web service is determined by this option (it is not configured directly).

  • Username, Password - you can specify the username and password for authentication directly in the web part properties, or inherit global values from Settings -> Integration -> Microsoft SharePoint. If you want to use the credentials from the settings, leave the fields empty.

  • List name - if you use the Display list items or Display list of pictures options, you must specify the list from which the items should be loaded. In the other two modes, you can leave it empty.

    The List name field is case sensitive.

The SharePoint datagrid web part displays the data and the SharePoint datasource web part provides the data, if properties in the SharePoint section are configured correctly. The other two web parts in this section, i.e. the SharePoint datalist and SharePoint repeater web parts, still need to have a transformation specified.

Transformations

The SharePoint datalist and SharePoint repeater web parts need to have a transformation specified in order to display the retrieved data.

There is a number of pre-defined transformations which you can use. You can modify the transformations according to your needs. The transformations are stored under the SharePoint - Transformations document type (you can edit the document type in the Document types application). The names of the transformations correspond to the intended purpose.

Before you start using the transformations, you need to replace the sample server or field names with the real names used on your SharePoint server.

Advanced

In the Advanced section, you can specify (limit) the data you want to retrieve. The properties only apply in Get list items mode.

  • Row limit - sets the maximum number of retrieved items.
  • Query - filters or sorts the returned items. Its purpose is similar to that of a WHERE condition in SQL, but it has completely different syntax based on CAML. For more information on how to construct such queries, search SharePoint documentation or use Google with keywords like “SharePoint query”.
  • View fields - directly specifies which fields (columns) of a SharePoint list should be retrieved.

Display

In the Display section, you can control how the system processes and displays the retrieved data.

  • Selected item querystring key name - if entered, items are selected based on the presence of this key in the URL query string.

  • Selected item field name - allows you to specify a field that will be used to select items. The default approach is to select items by ID - the web part tries to get the query string parameter specified in the Selected item querystring key name property and uses its value. For example, if you entered id into the property above, aspx?id=2 will select the item with 2 in its ID field.

    The original field name is used here - without the ows_ prefix.

    This field is case sensitive.

  • Selected item field type - specifies the type of the ItemID field. For IDs, you should use the Counter type. For strings, use the Text type. These two should be sufficient in most cases, but you can search SharePoint documentation for other types.

  • Use dataset - if enabled, the retrieved XML data is converted to a dataset that can be used with standard ASCX transformations. If disabled, the data is not modified and can be converted directly to HTML using XSLT.

  • Dataset fields - if you want to use the dataset format but you don’t need all fields, you can specify which fields should be included in the dataset by entering their names separated by semicolons. This property can be particularly useful if you want to use caching.

Properties in the Display section are not available for the SharePoint datagrid web part.

Debug

Because it is sometimes hard to tell or remember how SharePoint addresses list fields, we implemented the Show raw response function. It displays all retrieved SharePoint data in its raw XML form. You can look for fields which contain valuable information and can be displayed.

If the data is fetched from the cache, the response cannot be printed.