Add Document to Library step
Use the Add Document to Library step to add or upload a document to a SharePoint site. Use the Add Document to Library step in the following scenarios:
- A business application workflow uploads documents associated with a customer order to a library, putting all documents from that order in the same place
- A business application uploads documents provided for archival, editing, or review purposes
- New customer on-boarding workflow uploads documents related to the customer to a library
Drag the Add Document to Library step from the SharePoint category, Favorites bar, or the Recent category onto the canvas.
Example of an Add Document to Library step in a workflow- From the Toolbox click the SharePoint category, the Document category, and then drag the Add Document to Library step onto the canvas.
- Select the added step and click the expand / collapse toggle to expand the Configuration Panel. You can also double click the step to expand the panel.
- Select the Add Document to Library tab. Use this tab to configure the step's properties.
- In the Document field type a value, use inline functions, or use dynamic fields by clicking the expand or collapse toggle to expand the Context Browser. Within the Context Browser, select inline functions from the Functions, Fields, SmartObjects or the Workflow categories to define your function. Click and drag the function on to the field.
- From the menu, click Browse and navigate to the location of the library.
- Select the library and then click OK.
- In the Folder field type a value, use inline functions, or use dynamic fields by clicking the expand or collapse toggle to expand the Context Browser. Within the Context Browser, select inline functions from the Functions, Fields, SmartObjects or the Workflow categories to define your function. Click and drag the function on to the field.
- In the Properties section, add fields and values to update with. Click Add.
- In the added property field, type a value, use inline functions, or dynamic fields, by clicking Add to expand the Context Browser. Within the Context Browser, select inline functions and fields from the
Functions,
Fields, SmartObjects and Workflow categories. Click and drag the function into the property field.
To add additional properties, click Add.
- To delete properties, select them and click the Trash bin.
- To create a reference click Create. Reuse this reference in the current step or from another step in your workflow.
- To edit the auto-generated reference title, click Edit.
- To locate the added reference, expand the Context Browser, select Fields and then expand the Reference section.
- With the step selected, select the Properties tab.
- Click the Errors tab.
- If the option is selected - the new document overwrites the existing document.
- If the option is not selected - Runtime exception error occurs.
- If the option is selected - the instance continues to the next step in the workflow.
- If the option is not selected - Runtime exception error occurs.
- If the option is selected - the instance continues to the next step in the workflow.
- If the option is not selected - Runtime exception error occurs.
Your changes are automatically saved.
The following table explains the options available on this tab:
Option | Explanation | How to Use |
---|---|---|
Document | Use this to supply a field that contains the document content. Select a document reference defined earlier in the workflow or use a content field and drag a pre-configured field from the Context Browser such as an Reference or SmartObject load method property. When a Reference is used, make sure to drag the entire File reference into the Document field.
When a SmartObject load method property is used, an input property is required for the correct information to load. | Type or drag a value into the Document field. |
Destination Library | ||
Pick Library | Use this section to specify the library where the document is uploaded. Select one from the menu or to browse to it. The menu contains a list of referenced libraries in the workflow. If you don't see items in the menu, you need to create a SharePoint referenced item using a SharePoint reference step within the workflow. | Click the menu and select the reference name. Click the menu and select Browse to browse to a specific library. |
Folder | Use this section to select a folder where the document is uploaded. If the folder does not exist, the step creates the folder. Type values or create dynamic values by dragging Functions, Fields, SmartObjects and Workflow-related items from the Context Browser into the fields. | Type or drag a value into the Folder field. |
Properties | Use this section to add properties and detail for the document. Type values or create dynamic values by dragging Functions, Fields, SmartObjects and Workflow-related items from the Context Browser into the fields. | Click Add to add a property. Click the menu to select the property. Type values or create dynamic values by dragging Functions, Fields, SmartObjects and Workflow-related items from the Context Browser into the fields. To delete properties, select them and click the Trash bin. |
Use Document Later | Use this option to create a reference to the document that can be used in other steps within the workflow. | Click the Create link to create a reference. Click the Edit link to edit the reference name. If you edited the reference name and want to reset it, click the Reset Name link. |
For more information on how to use Smartfields see the Smartfield Composer topic. Added filters can be grouped together to form parameters. To group parameters, click the AND button.
For more information about the different browse states and errors, see the Browse States topic.
For more information on how to use the breadcrumb bar, see the How to use the Breadcrumb topic.
The following table explains the options available on this tab:
Option | Explanation | How to Use |
---|---|---|
Title / Name | By default, each step on the canvas has a step title. You can change this title to suit your workflow logic and show it on the canvas by checking the Show Label box. | Enter a value into the Title/Name field. |
Reset link | Use the link to reset any changes to the title. | Click the Reset link to reset the Title/Name field to default value. |
Show Label | Allows you to see the step label on the canvas. The label shows the value of the title. | Check the check box to display step label on the canvas. |
Description | Allows you to add a detailed description for the step. | Enter a value into the Create New field. |
Notes | Allows you to add additional notes for the step. | Enter a value into the Notes field. |
Different types of exceptions can occur on a step, such as:
Type | Description |
---|---|
Known exceptions | Any SmartWizard or standard wizard that has Boolean options for handling known exceptions have these options displayed as check boxes in the Known exceptions section of the Exceptions tab. |
Unhandled exceptions | Any unknown runtime exceptions. |
The tab contains the following Known exceptions:
Exception | Explanation | How to Use |
---|---|---|
Continue on error | When this option is selected the workflow is not in an error state, but merely continues executing the next step. | Check the check box to continue the workflow. |
Overwrite existing document | During execution, when an existing document with the same name is found in the library, the following options are available: | Check the check box to overwrite existing document. Unchecking the check box results in a runtime exception that must be handled by a process administrator. |
Continue if document is checked out | During execution, if the new document is checked out (cannot be edited), the following options are available: | Check the check box to continue to the next step if document is checked out. Unchecking the option results in a runtime exception that must be handled by a process administrator. |
Continue if there is no document to upload | On step execution, if the new document is empty (contains no content), the following options are available: | Check the check box to continue to the next step if there is no document to upload. Unchecking the option results in a Runtime exception that must be handled by a process administrator. |
The tab contains the following unhandled exceptions:
Exception | Explanation |
---|---|
Log Exception | Logs the exception to the error log. |
Force error when required SmartObject inputs are missing | Will forcefully throw an error if a SmartObject method has input missing. |
Continue on error | Will force the workflow to continue running the SmartObject method, even if it runs into an error. |