Adding a SharePoint Data Source to the Template
To add a SharePoint data source to a template click on the Data Tags button in the DocGeneration ribbon.
Click on the Add Source button on the right-side pane to open the Data Source Builder dialogue.
The following SharePoint list types are supported:
- Generic List
- Document Library
- Announcements List
- Contacts List
- Tasks List
- Picture Library
A SharePoint Data Source references a SharePoint List’s or Library’s fields, the data source will return the lists row items as data:
Under Data Source Type on the left, ensure SharePoint is selected.
Enter a name in the Data Source Name field (limited to 20 characters & no spaces).
Navigate to the SharePoint Site and the specific list that needs to be added.
On the right panel window, select the fields from the list needed.
Select a row item from the associated SharePoint List to initialise a quick test to check whether the data source is returning data.
Returning a Table
A SharePoint List data source can be returned as a table. This gives the user the ability to return all the rows of data from the SharePoint List.
From the data source builder window, after the SharePoint List data source has been configured, check the Return Table check box and provide the table with a suitable name.
Expression and Criteria
Input parameters (Expression and Criteria) can be used to return an individual record (item) or a single record from a table from a SharePoint List. This can also be used to link identical fields across lists i.e. the ID field. When adding another list to the template that is not the associated list, identical fields from the new list can be linked to that of the associated list which will be used as inputs when the merge of the template takes place. I.e. ID = ID, this denotes that the ID field being used from the associated list links to the ID field from the new list being added, so when line item one(ID:1) from the associated list is used it will return item one from the newly added list.
Expression – select a field from the SharePoint List chosen.
Operator – select an operator to be for the comparison.
Criteria – select a field from the SharePoint List that the template is based on or enter in a default value.
Note: With regards to Tables, if no Expression and Criteria are selected, the Data Source will display all the items from the table when it gets merged. With regards to a SharePoint Data Source with no tables. If no Expression and Criteria are set then it will return the first row/item from the SharePoint Data Source.
Select Expression and Criteria if required.
When the setup is complete click “Ok” to confirm.
DocGeneration will then run a quick validation on the Data Source to check if data is being pulled through.
Select a row from the associated List in the test window.
If DocGeneration validates the Data Source successfully it will return values.
Click “Ok” to add the Data Source.
The Data Source will now be added to the right hand side pane.
- For help on Adding a Web Service Data Source, follow the step-by-step instructions here.
- For more information on Adding a Web Service Data Source follow the step-by-step instructions here.