Delete Draft Versions of SharePoint files

To delete draft versions of files in SharePoint, do the procedure in this topic.

Screen



Screen



Good to Know

How to Start

  1. On the Application Explorer screen, do one of these:
  2. Do one of these:
    • Add an activity:
      1. In the Process Builder, go to the Activity Library, and open the SharePoint SharePoint icon tab.
      2. On the SharePoint SharePoint icon tab, drag the Delete Draft Version Delete Draft Version icon activity onto your process.
    • Change an activity:
      1. In your process, double-click your activity.
  3. Click Delete Draft Version Configuration Delete Draft Version Configuration icon.

Procedure

  1. On the Delete Draft Version Configuration screen, in the SharePoint field, select your SharePoint access token.

    To create a new access token, click Add Token Add Token icon. For more information, refer to Access Token for SharePoint.

  2. In the Site URL list, select your site.
  3. In the Library list, select the name of your SharePoint library.
  4. Do one of these:
    • To delete all the draft versions, do this procedure:
      1. In the Delete All Drafts / Filter Condition field, select Delete All Drafts.
      2. (Optional) To delete all the draft versions of the files in your SharePoint library, as well as in the subfolders, select Include All SubFolders.
    • To delete the specific draft versions, do this procedure:
      1. In the Delete All Drafts / Filter Condition field, select Filter Condition.
      2. (Optional) To delete the specific draft versions of the files in your SharePoint library, as well as in the subfolders, select Include All SubFolders.
      3. Complete these fields as necessary.
        Field Name Definition

        Show Hidden Fields

        Function:
        Specifies whether you can use hidden columns in SharePoint to build your expression to delete the draft versions of the SharePoint files.
        To Open this Field:
        1. In the Delete Draft Versions field, select Filter Condition.
        Accepted Values:
        • Deselected - The SharePoint hidden columns are not available to build your expression.
        • Selected - The SharePoint hidden columns are available in the Fields box, so you can use them to build your expression to filter the SharePoint files.
        Default Value:
        Deselected

        Code Snippet

        Function:
        Shows the code snippet the system creates for the WHERE clause.
        To Open this Field:
        1. In the Delete Draft Versions field, select Filter Condition.
        Accepted Values:
        Read only.
        Default Value:
        None
      4. To configure a WHERE clause for your filter condition, click Add Condition Add Condition icon.
      5. On the Delete Draft Version Configuration > Expression Builder screen, complete these fields as necessary.
        Field Name Definition

        Fields

        Function:
        Specifies the name of the SharePoint column.
        Accepted Values:
        Read only.
        Default Value:
        A list of names in the specified list.
        Accepts Process Data Variables:
        No

        Add Condition Add Condition icon

        Function:
        Creates a condition row.

        Select Nest Type

        Function:
        Specifies the use of logical AND and OR operators to nest conditions for the WHERE clause.
        • And - Specifies the logical AND operator.
        • Or - Specifies the logical OR operator.

        You must set the nest type first, before defining the condition for the where clause.

        Column

        Function:
        Specifies the name of the SharePoint column.
        Accepted Values:
        A valid SharePoint column name.

        Drag the name the column from the Fields field and drop it into the Column Name field to build a condition.

        Default Value:
        None
        Accepts Process Data Variables:
        No
        Example:
        Title

        Comparer

        Function:
        Specifies the operator to use in your WHERE clause.
        Accepted Values:
        • =
        • !=
        • Contains
        • Begins with
        • Is Not Null
        • Is Null
        Default Value:
        =

        Value

        Function:
        Specifies the value for the column.
        Accepted Values:
        A valid column value.
        Default Value:
        None
        Accepts Process Data Variables:
        Yes

        Delete Delete icon

        Function:
        Deletes the row.