Use document or folder variables
Use a document or folder variable in activities such as Ordinary, Email, Business rule, .NET, and in Decision nodes.
Use fields or the System properties of a field from a document or folder variable:
-
In any place within a process or rule where a variable can be used.
-
In a node of any type in a process where a variable can be used.
You must initialize a document or folder variable before using it in a process or node; otherwise, the job is suspended.
Use a document or folder variable in an ordinary manual activity
Use the document or folder variable or variable fields as activity inputs and outputs to use extracted information within your process flow.
-
Use a document or folder variable as input or output in the activity. The document or folder variable display name appears along with a document icon.
-
Use custom fields from a document or folder variable in the inputs or outputs. System fields can be set as inputs only.
When you create a job on this process that has a document or folder variable and fields as inputs and take the activity (using the generic Take Activity page):
-
The document or folder field values (current or default) appear as read-only.
-
If a document or folder variable is used, nothing appears on the form to represent the variable.
-
If you use document or folder fields as inputs but no instance is identified, and if you try to take the activity, an error occurs.
-
If you use document or folder fields that are no longer part of the document or folder type definition, or the document or folder type does not exist, the job is suspended.
When you create a job on a process that has a document or folder variable and fields as outputs and take the activity:
-
The document or folder field values appear as editable displaying the current or default value.
-
If a document or folder variable is used, nothing appears on the form to represent this variable.
-
When you complete the activity, the values in the fields are updated appropriately.
Use a document or folder variable in a business rule activity
-
Use a document or folder variable into rule inputs and outputs. The variable display name appears after the variable is mapped.
-
Use document or folder variable fields (system or custom) into rule inputs and outputs of the corresponding type. The variable display name and field name appear after the field is mapped.
-
Use system properties of a custom field into rule inputs of the corresponding type. The variable display name, field name, and property name appear after the value is mapped.
You cannot map rule outputs to system fields or system properties.
When you create a job on the process using this business rule activity, the document or folder and fields mapped as input are passed to the rule, and the mapped document or folder variable and fields are updated with the returned value. However, if no instance is identified in the input document, the job is suspended, and an event log or a job note describes the error.
Use a document or folder variable in a decision node
Use one or more document or folder fields (system or custom) from a document or folder variable in a decision node to use the extracted information to control your process flow.
You can use System/custom fields from a document or folder variable in the condition text.
When you create a job on this process:
-
The information in the document or folder fields is used in the decision in the email.
-
If you use document or folder fields but no instance is identified, the job is suspended, and an error is written to the event log or job note.
-
If you use document or folder fields that are no longer part of the document type definition, or the document or folder type does not exist, the job is suspended.
Use a document or folder variable in an email activity
You can use the document or folder fields (system or custom) from a document or folder variable to add attachments directly from the repository in the following properties of an Email activity: From, To, CC List, BCC List, Subject, Attachment, Importance, Format, and Body.
You can use the extracted information to generate an email.
When defining the TO, CC, or BCC list, use one or more fields from a document or folder variable in addition to static text, resources, roles, and other variable types.
When defining the email body, use one or more fields from a document or folder variable in addition to static text and other variable types.
When you create a job on this process:
-
The information in the document fields is used in the email.
-
If you use document or folder fields but no instance is identified, the job is suspended, and an error is written to the event log or job note.
-
If you use document or folder fields that are no longer part of the document type definition, or the document or folder type does not exist, the job is suspended.
Use a document or folder variable in a Dynamics CRM /Content Manager /RPA /Exchange node
Use the document or folder fields (system or custom, and custom field properties) from a document or folder variable in a Dynamics CRM / Content Manager / RPA / Exchange node and use the extracted information.
You can map a document or folder variable to parameters of type string (the instance ID is passed). However, you cannot map System fields to return parameters.
When you create a job on this process:
-
The information in the document or folder fields is passed into the Dynamics CRM / Content Manager / RPA / Exchange activity.
-
If a custom field is mapped to a return parameter, the value in the document or folder instance is updated accordingly.
-
If you use document or folder fields but no instance is identified, the job is suspended, and an error is written to the event log or job note.
Use a document or folder variable in a Create subjob node
You can use a document or folder variable or fields in a Create subjob activity.
You can use:
-
A document or folder variable in the initialization and output parameters that are of type document/folder. The variable display name appears after the variable is mapped.
-
Document or folder variable fields (system or custom) or field properties in the initialization and output parameters of the corresponding type.
You cannot map output values to system fields.
When you create a job on this process that creates the subjob:
-
The document or folder fields mapped as initialization are passed to the subjob and the mapped document or folder variable and fields in the parent job are updated with the returned value.
-
If a custom field is mapped to a return parameter, the value in the document or folder instance is updated accordingly.
-
If you use document or folder fields but no instance is identified, the job is suspended, and an error is written to the event log or job note.
Similarly, you can use a document or folder variable when creating a subjob in a fragment using case variables or creating a fragment as a subjob from a case process.
Use a document variable in a SharePoint uploader node
Use a document variable in a SharePoint uploader node and use any of the document values to add a document to SharePoint.
You can use a document variable in the source document file path parameter only. When you use a document variable, an extra file type option such as PDF is available.
You can use system or custom fields and custom field properties from a document variable in any of the parameters. You can also map a document variable to parameters of type string (the instanceID is passed). System fields cannot be mapped to return values.
When you create a job on this process:
-
The information in the document fields is passed into the SharePoint uploader node.
-
If a document variable is mapped to the source document parameter, the corresponding file type selection is retrieved and added to SharePoint. If a document of that type does not exist, the job is suspended.
-
If a custom field is mapped to a return parameter, the value in the document instance is updated accordingly.
-
If you use document fields but no instance is identified, the job is suspended and an event log or job note describes the error.
Use a document or folder variable in a SharePoint add item node
Use a document variable or document fields (system or custom) in a SharePoint add item node to extract information.
You can use a document variable in the source document file path parameter only.
When a document variable is used, an extra file type option (PDF) is available.
Use system or custom fields and custom field properties from a document variable in any of the parameters. You can also map a document variable to parameters of type string (the instanceID is passed). System fields cannot be mapped to return values.
When you create a job on this process:
-
The information in the document is passed into the SharePoint add item node.
-
If a document variable is mapped to the source document parameter, the corresponding file type selected should be retrieved and added to SharePoint. If a document of that type does not exist, the job is suspended.
-
If a custom field is mapped to a return parameter, the value in the document instance is updated accordingly.
-
If you use document fields but no instance is identified, the job is suspended and an event log or job note describes the error.
Use a document or folder variable in an Expression activity
Use document or folder variable, or custom fields from a document or folder variable, as the target in an Expression activity. The extracted information is then used to derive another value. The System fields or system properties of a custom field cannot be used in the target.
Use a document or folder variable in a .NET activity
Use the document or folder fields (system or custom) from a document or folder variable in a .NET activity and use the extracted information.
You can use system or custom fields from a document or folder variable in method parameters. If a parameter is of type document or folder, you can map the full document or folder variable (as opposed to fields in the variable), or a string variable or static text with a document or folder instance ID. System fields cannot be mapped to return parameters.
When you create a job on this process, the information in the document or folder fields is used in the .NET activity. If a custom field is mapped to a return parameter, the value in the document or folder instance is updated accordingly. However, if you use document or folder fields and no instance is identified, the job is suspended, and an event log or a job note describes the error. If you use document or folder fields that are no longer part of the document or folder type definition, or the document or folder type does not exist, the job is suspended.
Use a document or folder variable in a loop activity
Use document or folder variables in a loop activity to process the contents of a folder.
-
Folder.Documents or Folder.Folders system properties into the complex variable field. Both these system fields return arrays.
-
Document or folder fields into Start Index, Updated Index, or Row Found properties.
-
Documents or folders into the column mappings, or fields from a document or folder.
When you run your process, the Loop activity iterates through the array that is mapped. If a document or folder is mapped as an output, you can loop through the collection of documents in a folder and access each one using a document or folder variable.