Connector for Microsoft SharePoint in applications
Set up access to an external data group
Displaying and editing SharePoint files and fields
Creating and editing SharePoint folders
Set up access to an external data group
A connection to a SharePoint data source, which was configured with the Connector for Microsoft SharePoint in the module Integration, can be used in any Intrexx application. To start with, add a new external data group by using the context menu from the application node.
The dialog for choosing your external data group will open automatically.
General properties of the external data group
Provide a
Title for the new external data group. In the drop-down menu
Database connection, the desired connection can be selected. The appropriate data handler will be automatically entered in the drop-down menu
Data handler when using a SharePoint database connection. You can enter the name of the
Table or
View directly or by clicking on
Search.
You can search for the name of the table or view here. In the field
Filter, enter a character string that should be search for. The character
* serves as a placeholder for any character.
A* will find any table or view that begins with
A.
*A* will come back with any element that contains the letter
A. Highlight the desired library or list in the lower section of the dialog and then click on
OK.
The login type is defined in the lower area. The option
Login as current user will request the login details of the currently logged in user when they open a page into which a SharePoint connection is integrated. A fixed SharePoint user for logging in can be specified with the option
Login as static user. Click on the link
Select user.
You also have the option of adding additional users here. Then click on
Select user.
The login information of the static user has now been provided. The desired data fields that should be provided by the SharePoint service can now be selected under the tab
Data fields and connected to the elements in the Intrexx application.
Data fields
In SharePoint, there are two types that can be used for managing data: The
document library and the
list. Every element has exactly one file attachment in a document library, whereas a list element can have any number of file attachments. In every SharePoint data group, there is a virtual data field
SharePointDocument, which does not exist on the SharePoint site, but is generated by the adapter. It is recognized by Intrexx as a file field and provides the ability to access the files from a SharePoint dataset. In the configuration for the
File data field, you can determine which type (
document library or
list) you would like to use in your external data group.
Under the tab
Data fields in the properties of the external data group, any field, which is available to SharePoint, can be added to the external data group. You can modify the settings of
File data fields by clicking on
Edit.
The
Title of the field as well as the handler class of the SharePoint connection is displayed under the tab
General.
Additionally, the following entries are needed:
Version
Select the version of your SharePoint server.
Type
Select whether you would like to use a
Document library or a
List here. When using a document library, additional details for ascertaining the metadata are required; these are described below. The type
List simply requires you to select the version and optional set up the
Check-Out option.
File name
For a
Document library, select the field where the name of the file is saved or, where applicable, created.
File path
For a
Document library, select the field where the directory, where the files are stored, is saved or, where applicable, created.
Last edited
For a
Document library, select the field where the date of the last edit is saved.
Content Type ID
For a
Document library, select the field that contains the type of document in the form of an ID so that the documents, which you attach, can be assigned to the correct category later.
Check-Out required
This option allows you to specify that documents must be checked-out before being edited. In the box below, you can select the field where comments regarding the changes made can be entered. This function is only supported by SharePoint 2013.
Displaying and editing SharePoint files and fields
The data from a SharePoint external data group can, for example, be displayed in a view table.
In the properties of the view table, select the SharePoint external data group in the drop-down list
Data group and insert the fields that you would like to show in the table by clicking on
Add column. You can see an example of the appearance of a document library below.
And here is an example of a SharePoint list.
If you would like to add data or edit existing data, you can create an edit page in the SharePoint external data group.
Connect the edit elements to the data fields from the external data group. The SharePoint data field is already selected for the File selection element.
By adding a button to the corresponding view table, you can now modify existing data.
If the file control is linked to a document library in SharePoint, then the option
Replace existing files needs to be activated in the properties of the file selection under Upload mode because only one file can be saved per dataset in a
document library. The option
Attach files at end is recommended for SharePoint lists.
|
Please note: In order for files to be saved to document libraries successfully, at least one entry field for the path needs to be on the entry page.
Path: The storage location must be determined in the format of a SharePoint path here. This is usually the relative path to a list or library in a SharePoint site (e.g. /published documents). If you would like to save to a subfolder, attach this at the end of the path (e.g. /published documents/subfolder). It's recommended to automatically allocate this value in the field. Alternatively, the field can be moved to the hidden area, provided the value can be identified automatically.
Optionally, the field Name for the file name and Title for the title can be added. If the field for the file name is not provided, Intrexx will automatically ascertain the value from the name of the uploaded file.
If you would like to edit the data of a SharePoint list, check the setting Enable multi-file upload in the options of the File selection.
|
Apart from that, any desired edit fields for the SharePoint files metadata fields can be added to the Intrexx edit page.
Creating and editing SharePoint folders
Folders are a special feature of document libraries. Even these can be created and edited using Intrexx but to do that, certain prerequisites need to be taken into account.
- There cannot be any file fields on the edit page.
- An edit page must at least have edit fields for Name, Path (parent directory) and ContenttypeID. The field ContenttypeID has to contain the value 0x120. The field can be allocated automatically and placed in the hidden area. The field Path must contain the path of the parent directory (e.g. /Published documents). Additionally, the title can be specified.
- In the external data group of the document library, the following expert settings need to be defined:
sharepoint.document.library = true
sharepoint.file.contenttype.field.guid = GUID of the ContenttypeID field
sharepoint.folder.name.field.guid = GUID of the Name field
sharepoint.folder.name.field.guid = GUID of the Path field
sharepoint.version = SharePoint Version (SP2013 or SP2010)