Copy and modify a data source
There are certain situations in which you may want or need to copy a data source connection before you modify it, including:
-
When you are working with Microsoft SharePoint lists and libraries and you want to create a custom query.
The data source connection for SharePoint lists and libraries displays data from a default query that cannot be modified. However, if you copy a data source connection for a SharePoint list or library, you can then create a custom query.
-
When you are working with a database, and you want to create several data source queries that are based on the same source data.
You can copy and modify other data source connections in the Data Sources list. When you click Copy and Modify, you create a copy of the connection, and be able to modify any of the details in the connection.
You can modify the query for SQL-based data sources, such as SharePoint lists and libraries and database connections. For other data source connections, there is no query to modify. However, you can modify other properties for those data source connections.
In this topic
About copying and modifying data sources
This section provides information on when you would typically want to copy and modify a data source.
SharePoint lists and libraries
Microsoft SharePoint lists and libraries that appear in the Data Sources list are connections to the original data, and they display the results of a query on that data. Unlike with queries for other data sources in the Data Sources list, you cannot modify queries for data sources that are automatically created for SharePoint lists and libraries. You can, however, copy a connection to a SharePoint list or library and then create a custom query to apply to the list or library in order to display the exact data that you want.
Database connection
You can modify a query for a database connection both quickly and easily. However, if you have several queries, all of which you use on a regular basis, you may find it convenient to save each individual query as a separate data source.
For example, Northwind Traders, a gourmet food company, tracks their products in an SQL database. The default query on the database displays all of the products that Northwind Traders has ever ordered. A team member suggests that another query be created to display only those products that have been discontinued. This result can be easily accomplished by copying the first data source query, modifying the query so that it displays only the discontinued items, and then saving the modified query under a new name as a separate database connection in the Data Sources page.
XML file
As with SharePoint lists and libraries, you cannot modify the data source connections that are automatically created for local XML files. However, you can copy and modify local XML files in order to modify the name of the data source, add a description, or add keywords. The name, description, and keywords for an external XML file can be modified without first copying the data source.
REST, RSS, and server-side scripts
Copying and modifying a connection to a server-side script might be helpful if you need to connect to that same server script but with different parameter values.
SOAP Web Service
Copying and modifying a SOAP Web service might be helpful if you need to connect to the same Web service but want to use either different methods or different parameter values.
Linked data sources
Copying and modifying a linked data source may be helpful if the linked data source is composed of database connections and you want to create a copy of the first linked database connection in order to modify the query.
Copy and modify a data source connection
-
Click Data Sources on the Navigation Pane.
-
On the Data Sources tab in the gallery, right-click the SharePoint list or library that you want to copy and then modify, and select click Copy and Modify.
The Data Source Properties dialog box appears.
-
On the General tab, in the Name box, do the following:
-
Type a name for your new data source.
Note: If you don't type a new name for the copy of the data source, the name will be the same as that of the original data source, but with _copy(1) appended. For example, if you copy the Announcements data source connection but don't type a new name, the name of the new data source will be Announcements_copy(1).
-
In the Description box, type a description for your new data source.
-
In the Keywords box, type any keywords that you want.
-
-
On the Source tab, for information about what you can modify, refer to the following table:
If your data source connection is a | In the Source tab, you can |
SharePoint list or library | Specify a query for your new list or library. For more information about creating a query, see the See Also section. |
Database connection | Specify a query for your new database connection. For more information about creating a query, see the See Also section. |
REST, RSS, and server-side scripts | Add or modify the parameters, as follows:
|
SOAP web service | Modify parameters, as follows:
|
No comments:
Post a Comment