Knowledge Base

How to sync data automatically from external data sources to SharePoint list based on schedule?

BoostSolutions' Data Connector can sync data from external data sources to SharePoint list, or verse. To ensure to the data in SharePoint list or external data source stays up-to-date, you are enabled to automatically sync data by schedule, by minutes, daily or weekly.

In this article, we will demonstrate how to sync data automatically from external data sources to SharePoint list based on schedule.

WHAT YOU'LL GET

Specify to sync data every 60 mins automatically

WHAT YOU'LL NEED

The sample data we use for this case

Create a list named as Purchase-Orders from the custom list template on a SharePoint site, the list contains the same columns with that in the Purchase Orders table.

Sync data automatically from external data sources to SharePoint list based on schedule

  1. Download the trial version of Data Connector and install it to your SharePoint server.

  2. In the Central Administration, click the WEB APPLICATIONS, then click Manage Features.

  3. When Manage Web Application Features dialog appears, set Status of Data Connector Timer Job as Active as following.

    This feature will enable a timer job runs in the background to check job and synchronize data between external data sources and SharePoint list.

    Click OK to save the settings.

  4. Navigate to the site in which the Purchase-Orders list is located.

  5. In the upper right corner, click Settings and then click Site Settings.

  6. On the Site Settings page, click Data Connector Settings under BoostSolutions Software section in the bottom right corner of the page.

  7. On the Data Connector Settings page, click Create Job.

  8. After clicking Create Job, you will enter the Edit Job page.

    In the Job Name section, specify a unique name for the job, such as job-1.

  9. In the Direction section, specify the direction for the data connection. Select From list to external data option which means we will sync data from the external data source to this SharePoint list.

  10. In the List section, specify a SharePoint list or Document Library to which you want to sync data from the external data source. Select Choose an existing list option. Click to browse and select the Purchase-Orders from the drop-down list.

  11. In the External Data and Authentication section, configure the settings as following. Specify the external data type and database authentication. (Ensure the user account you specify has the appropriate permissions to access the external data source.)

    External Data Type: Select SQL Server as the external data type.

    Database Server: Enter the SQL server’s name or its IP address.

    Database Authentication: There are two types of authentication, Windows Authentication and SQL Server Authentication.

    Windows Authentication: Select this authentication if you want to use the application pool account to access the SQL database. You need to enable Windows Authentication as the Authentication Mode in SQL Server in order to access the database successfully.

    SQL Server Authentication: If you select this authentication, you need to enter a SQL user name and password to access the database.

    Here we select the SQL Server Authentication.

    Username: Enter a SQL user name. The user should have Write permission to the database.

    Password: Enter the user’s password.

    Click Connect to connect the SQL Server we specified (the dbserver3 in our case). If everything goes right, it will show Connection successful below the Connect button. And the databases existed on the specified SQL server will be populated to the dropdown list as shown in the picture above.

    Database: Select a database, here we select BoostSolutionsEnterprise.

  12. In the Data Settings section, specify which external data will be connected to the SharePoint list. Select Specify a table/view to filter option, and select dbo.Purchase Orders (the table Purchase Orders stored in the BoostSolutionsEnterprise database as we described in the sample data section) from the drop-down list as following.

  13. In the Column Mapping section, map the fields in the external database to the columns in the SharePoint list as following.

    By default, the database fields which have the same name and type with that of the columns in the SharePoint list will be automatically mapped.

    And then select Order No. as the key. A “key column” is one that uniquely identifies records and can be used to compare data sources.

    If the columns name or type are different between SharePoint list and external data source, you have to map the columns manually by clicking Add a column mapping link.

  14. Under the Schedule tab, check the checkbox of Enable background update option to automatically run this job.

    In the Schedule section, set the schedule to indicate how often the job should be performed. Select Minutes and specify the interval as 60.

    Note that you can also specify to sync data on a daily or weekly basis.

    Daily: You can specify several starting times to run the job automatically every day.

    Such as specify to sync data at 1:00, 9:00 and 18:00 automatically each day.

    Weekly: you can set a schedule for weekly recurrence. Select the days on which the job will run and specify the starting time.

    Such as specify to sync data at 6:00 automatically on each workday.

  15. Keep other settings as default and click Save to save the settings.

  16. And then you will find that the job has been created on the Data Connector Settings page, the job-1.

  17. Wait for about one hour, and navigate to the Purchase-Orders list, and you will find that the data in the SQL Server database have been synced successfully to the SharePoint list as following.

Login