Salesforce

SharePoint - XML (Magic xpi 4.13)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

SharePoint - XML (Magic xpi 4.13)

The SharePoint connector is designed to work with Magic xpi’s XML interface. When you drag the SharePoint connector into a flow, the Properties pane opens. Then, double-click or right-click on the connector and select Configuration from the context menu to open the SharePoint Configuration dialog box.

This dialog box contains the following fields:

Property

Description

Connection

Resource Name

The name of the resource that you selected in the component's Properties pane. The resources are defined in the Settings dialog box's Resources section.

Operation

Entity Type

The entity type that you want to work with. Select one of the following types from the drop-down list:

  • List (default): This is used to manipulate items and attachments. You can query, add, update, and delete items and attachments.

  • Libraries: This is used to manipulate documents in the SharePoint server. This is a specialized list type, and is therefore supported by Lists and Libraries. Documents can be uploaded into SharePoint, moved to and from different locations on the server, and can also be queried, deleted, and updated.

Entity

Click to open the Lists Collection dialog box. Select the entity that the operation will be performed on.

Operation

Select one of the following operations from the drop-down list:

  • Query: This is used to retrieve data from an entity. You can use the Data Mapper to retrieve entities based on specific criteria. For example, you can retrieve all contacts with Title = Professor. If there are multiple records in the Source, only the first mapped value will be returned.

This operation will return the complete Folder structure along with the documents when no filter is applied. (Since version: 4.7.7)

For information on currently supported comparison operators for this operation, click here.

  • Add: This is used to add new entities to your organization’s data. The Add operation can also add new folder and one or more sub-folders to it. To create a sub-folder, the parent folder should exist. The user can then add the documents to each of them and organize the data in the specific folders.

  • In case of List, set the ContentType value in the Data Mapper tree to Folder and provide name to the folder in the Title element to create folder or sub-folder.

  • In case of Library, set the ContentType value in the Data Mapper tree to Folder. Select FileLeafRef element from the Data Mapper tree and provide the folder name to create folder or sub-folder.

You can use the Data Mapper to specify new entity fields’ values.

  • Update: This is used to update a specific entity in your organization’s data. When you update an entity, you need to know its ID. For example, you can use the Query operation (above) to retrieve an entity ID, and then you can call the Update operation. You should use the Data Mapper to set the entity ID, as well as the other fields that you want to update.

  • Delete: This is used to delete a specific entity from your organization’s data. If you want to delete an entity, you need to know its ID. For example, you can use the Query operation (above) to retrieve an entity ID, and then you can call the Delete operation. You should use the Data Mapper to set the entity ID. This is the only value that you should set.

  • Move: This is used to move documents to and from different locations on the SharePoint server. This operation is available only when you select the Libraries Entity Type (above).

Return Fields

This is only available when you select an entity in the Entity field, and the Operation field is set to Query. This determines the fields that are returned by the query.

Select one of the following from the drop-down list:

  • All (default): Returns all of the fields in the query.

  • Selection: Returns specified fields only. To select the fields that you want to return, click to select fields from the Entity Fields List. You must select at least one field from the list.

  • By View: Returns fields according to the specified view. To select the required view, click to open the Views Collection dialog box. If no view is selected, the default view is automatically used.

Folder

This is available when you select Query, Add, or Update in the Operation field. Records can be organized in specific folders. This field enables you to query all records in a specific folder when you supply the folder's name.

Click to open the Expression Editor and enter the name of the folder.

Include Sub-folder

Determines whether you want to query the sub-folders for fetching the data. By default this check-box is unchecked.

When the Include Sub-folder field is checked, the Query operation for the SharePoint component will query the sub-folders for fetching the data. If the field is unchecked, the sub-folders will be ignored while running the Query operation.

  • If the check-box is unchecked and only the parent folder name is provided then the Query operation will fetch the data from the parent folder ignoring the sub-folders.

  • If the check-box is checked and only parent folder name is given, then the Query operation will fetch the data from only the given parent folder and its sub-folders. Other folders or documents in the List or Library will be ignored in this case.

  • If the check-box is unchecked and no folder name is provided in the Folder property described above, then the Query operation will fetch the data from all the folders in the List or Library.

(Since version: 4.7.7)

Include Attachments

This is only available when you select Query in the Operation field.

If the list item has attachments, and if this field is checked, the attachments are returned as Base64 in the result XML. If this field is unchecked, only the attachment name and its URL (if it has one) are returned.

Result Options

Store Result In

Defines where you want to store the resulting XML file. Select one of the following from the drop-down list:

  • Variable: Select a variable to hold the entity data that is returned by SharePoint.
    Click to open the Variables List. Select a variable where this information is to be stored (the default is C.UserBlob).

  • File: Select a file to hold the entity data that is returned by SharePoint
    Click to open the Expression Editor, or click and enter the file path where this information is to be stored.

Operation Success

This field lets you easily determine if the data entity was successfully located in SharePoint. Select one of the following from the drop-down list:

  • None: Select this option if you do not want to save the connector’s success or failure status.

  • Variable: Click to open the Variables List. Select the variable where you want to store the connector's success or failure status.

The SharePoint Configuration dialog box contains the following additional button:

Button

Description

Refresh XSD

Refreshes the current schema.

When you click Refresh XSD, the current schema is overwritten. A message dialog opens, and clicking OK confirms the update and the overwrite. Clicking No exits the process without updating the schema.

Using Custom Filter with Query Operation

While running the Query operation, you can now apply the custom filter based on the date range using the Calculated Value node property for Created or Modified nodes in the Data Mapper tree for filtering the SharePoint records. Using this filter you can get rid of the complexity of fetching a specific set of documents Created or Modified between the chosen dates.

Syntax for providing a date range in the SharePoint connector is 'Between(FromDate,ToDate)'

In Magic xpi, the date range will appear as, 'Between(YYYY-MM-DD,YYYY-MM-DD)'

For example:

  1. 'Between(2019-01-01,2019-01-02)'

  2. 'Between('& F.fromDate & ',' & F.toDate &')'

  • The above syntax is only applicable for the Created and Modified field for the Query operation and can’t be used with any other field.

  • The user will have to set the value of the node properties Always Use Custom Picture to Y and Picture to 30 to match the character length of the filter date range.

(Since version: 4.7.7)

Reference
Attachment 
Attachment