Skip to content

columnChoices statement

The columnChoices statement lets you retrieve a list of possible choices for columns of type “Choice” and derivated. It supports site and list columns.

The columnChoices statement returns a schema composed of 2 columns:

<columnChoices title="" relativeSiteUrl="" tableName="">
<field>...</field>
</columnChoices>
Column Description
ID Either contains the Lookup ID if available, or an auto-increment value (starting with 0).
Choice Contains the choice value.

Optional. Specifies the title of the SharePoint list from which you want to retrieve data.

The title attribute may be specified using a global variable (e.g.: title =“$title!” ), or using a query parameter (e.g.: title <=%22@title!>” ).

Note that if the title attribute is specified, the field should be a list column. If the title attribute is not specified, the field should be a site column.

If the title attribute is specified, it must contain the URL of a SharePoint site containing the list. If the title attribute is not specified, it must contain the URL of a SharePoint site that contains the site column.

This URL is relative to the SharePoint site as it is defined in the data source. This approach was chosen to make it possible to easily move from a SharePoint test server to a SharePoint production server by simply modifying the data source.

The relativeSiteUrl attribute may be specified using a report parameter (e.g.: relativeSiteUrl =” @url! ”) or a global variable (e.g.: relativeSiteUrl = ” $siteUrl! “).

This attribute makes it possible to assign a name to the set of data retrieved from your SharePoint list column / site column.

Though not extremely useful (but still mandatory) when you retrieve data from a single list/site column, this name will be the basis for applying operations between SharePoint lists.

The field element lets you specify the list column or site column you would like to retrieve from SharePoint.