SharePoint - Search Sites
Declaration
<AMSHAREPOINT ACTIVITY="search_sites" SESSION="text (options)" QUERY="text" ROWLIMIT="number" RESULTDATASET="text" />
Description: Retrieves available sites/sub-sites from a SharePoint server and populates a dataset with the results.
Practical Usage
Used to get information regarding SharePoint sites and sub-sites. This activity supports building search queries using:
- Keyword Query Language (KQL) - KQL is the default query language for building search queries. Using KQL, you specify the search terms or property restrictions that are passed to the SharePoint search service.
- FAST Query Language (FQL)- FQL is a structured query language that supports advanced query operators. You can use FQL when you want to create complex queries that you want to pass programmatically to the SharePoint search service.
Connection Parameters
Property |
Type |
Required |
Default |
Markup |
Description |
---|---|---|---|---|---|
Connection |
--- |
--- |
--- |
--- |
Indicates where this activity's SharePoint credentials should originate from. This is a design-time parameter used only during task construction, thus, contains no properties or markups. The available options are:
|
Session |
Text |
Yes if Connection set to Session |
SharePoint Session1 |
SESSION="mySession1" |
The name of the session to associate this activity with. This parameter is active only if the Connection parameter is set to Session. The default value is SharePointSession1. NOTE: Use the End Session activity to end an active SharePoint session. |
Version |
Text (options) |
Yes if Connection set to Host |
SharePoint 2010 |
|
The SharePoint version to associate with this session. The available options are:
NOTE: Some SharePoint activities are only supported in SharePoint 2010 or newer. |
Site |
Text |
Yes |
(Empty) |
SITE="http://myServer/tech" |
An existing SharePoint site to associate with this session. SharePoint sites are, functionally, ASP.NET 2.0 web applications that are served using IIS and a SQL Server database as a data storage back end. Active only if the Version parameter is set to SharePoint Online or SharePoint 2010 and newer. |
Authentication type |
Text (options) |
No |
Basic |
|
The method of authentication to use. Certain parameters become active depending on which authentication method is selected. Authentication types vary depending on the SharePoint version. Below lists available authentication methods and their compatibility.
|
Username |
Text |
Yes |
(Empty) |
USERNAME="theUserName" |
A valid SharePoint username. This parameter may or may not be active depending on which option is selected under the Authentication type parameter. |
Password |
Text |
Yes |
(Empty) |
PASSWORD="encryptedText" |
A valid SharePoint password. This parameter may or may not be active depending on which option is selected under the Authentication type parameter. |
Domain |
Text |
Yes |
(Empty) |
DOMAIN="myServer" |
The domain that the username (specified in the Username parameter) belongs to. This parameter may or may not be active depending on which option is selected under the Authentication type parameter. |
Certificate |
Text |
No |
(Empty) |
CERTIFICATE="C:\Temp\file.cer" |
The (DER encoded) certificate to use for SharePoint authentication. This parameter may or may not be active depending on which option is selected under the Authentication type parameter. |
Ignore invalid certificate |
Yes/No |
No |
No |
IGNOREINVALIDCERTIFICATE="yes" |
If set to YES, specifies that invalid server certificates that are detected will be automatically ignored. Set to NO by default. |
Timeout (seconds) |
Number |
No |
600 |
TIMEOUT="500" |
The total number of seconds allowed to connect to the SharePoint server, otherwise a time out error is generated. The default value is 600 seconds. |
Proxy type |
Text (options) |
No |
Default |
|
The proxy type to use. Required for SharePoint connections that pass through a proxy server. The available options are:
|
Use authentication |
--- |
--- |
--- |
--- |
If enabled, specifies that proxy authentication is required, enabling authentication-based parameters (disabled by default). This is a design-time parameter, therefore, contains no properties or markups. It is active only if the Proxy type parameter is set to HTTP. |
Proxy server |
Text |
No |
(Empty) |
PROXYSERVER="proxy.host.com" |
The host name (server.domain.com) or IP address (xxx.xxx.xxx.xxx) of the proxy server. This parameter is available only if the Proxy type parameter is set to HTTP. |
Proxy username |
Text |
No |
(Empty) |
PROXYUSERNAME=username |
The proxy username to authenticate with. This parameter is available only if the Use Authentication parameter is enabled. |
Proxy password |
Text |
No |
(Empty) |
PROXYPASSWORD="encrypted" |
The proxy password to authenticate with. This parameter is available only if the Use Authentication parameter is enabled. |
Proxy port |
Number |
No |
8080 |
PROXYPORT="8080" |
The port that should be used to connect to the proxy server. The default port is 808. This parameter is available only if the Proxy type parameter is set to HTTP. |
Site Parameters
Property |
Type |
Required |
Default |
Markup |
Description |
---|---|---|---|---|---|
Query |
Text |
Yes |
(Empty) |
QUERY="text" |
The KQL or FQL query. This activity supports building search queries using:
|
Create and populate dataset with SharePoint site information. |
Text |
Yes |
(Empty) |
RESULTDATASET="dataset_name" |
The name of the dataset to create and populate with information regarding the sites that are retrieved. |
Row limit |
Number |
Yes |
50 |
ROWLIMIT="100" |
Sets the row limit for the number of items to display in a view. |
Trim duplicates |
Yes/No |
No |
Yes |
TRIM="NO" |
Specifies whether duplicate items should be removed from the search results. If set to YES (default), duplicates will be removed. If set to NO, duplicates will remain in the search results. |
Description tab - A custom description can be provided on the Description tab to convey additional information or share special notes about a task step.
Error Causes tab - Specify how this step should behave upon the occurrence of an error. (Refer to Task Builder > Error Causes Tab for details.)
On Error tab - Specify what AWE should do if this step encounters an error as defined on the Error Causes tab. (Refer to Task Builder > On Error Tab for details.)
Datasets
A dataset is a multiple column, multiple row container object where every column represents a particular variable, and each row corresponds to a given member of the dataset in question. This activity creates and populates a dataset containing specific fields (rows) in addition to the standard dataset fields. The table below describes these fields (assuming the dataset name assigned was theDataset).
Name |
Type |
Return Value |
---|---|---|
theDataset.Write |
Text |
A 32-bit integer that specifies the Write security setting. |
theDataset.Title |
Text |
The title of the SharePoint site. |
theDataset.SiteName |
Text |
The name of the site. |
theDataset.Path |
Text |
The path to the site (e.g., /sites/can/fs). |
theDataset.IsDocument |
Boolean |
Yes if the item is a document. No if not. |
theDataset.Author |
Text |
The author of the document. |
Example
The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder.
Description: Get SharePoint site(s) and store information in dataset "myListItems". Session is "SharePointSession3".
<AMSHAREPOINT ACTIVITY="get_sites" RESULTDATASET="mysites" PROVIDER="session_based" SESSION="mySharePointSession" />