Skip to main content
Version: 2023 R2

Add an attachment to a list

The action allows you to add attachments to the SharePoint list.

Add an attachment to a list

1. Category

Attachments to be added will be selected based on their category. Available options:

  • All – attachments belonging to all categories will be selected,
  • No category – attachments not belonging to any category will be added,
  • Dynamic – create the category dynamically (using Variables editor) or enter it manually in the dedicated field. The category can be provided in BPS format (i.e. ID#Name) or as ID.

Additionally, specify which attachments from the chosen category should be added: All attachments, only The oldest attachment or only The newest attachment.

2. Regular expression

Attachments to be added will be selected based on a regular expression.
Use the Regex Creator as an aid in constructing the expression.

3. SQL query

Attachments to be added will be selected based on an SQL query.
This query should return a list of attachment IDs from the "WFDataAttachments" table.

Example
Select [ATT_ID] from [WFDataAttachmets] Where [ATT_Name] = 'file.docx';  

4. Connection

Specify the SharePoint site collection on which the action will be executed.

caution

The Default option is only available for actions created in earlier versions of the system. For newly created actions, this option is unavailable.

5. Address

After defining a Connection, choose or enter the relative address of the SharePoint list or document library to which an attachment will be added.

tip

The relative list / document library address is the address without the value https:// at the beginning. The Connection field covers this value.

In such a case, the full address of the list / document library should be comprised of the connection definition and the relative address of the list / document library.

Example

SharePoint list, format connection/site/Lists/list/id:
https://webcon.sharepointonline.com/BPS/Lists/BPS_List/1

SharePoint document library, format connection/site/documentLibrary: https://webcon.sharepointonline.com/BPS/BPS_DocumentLibrary

The SharePoint list / document library address can also be created dynamically using values from Variables editor.

6. New file configuration

The file name generated for the attachment after it is added to the SharePoint list. By default, it will be the same as for the original attachment.

7. Variables editor

Dynamically generated tree containing all variables that may be used in the current location of Designer Studio. Information on how to use variables in WEBCON BPS, as well as a list of variables can be found in the dedicated section.

info

For more information on SharePoint content actions, read THIS ARTICLE on our technical blog.