Fields
Fields, displayed in brown, contain information from references, variables, and the environment. You can use the values from these fields as input values in steps, rules, functions and more. There are three main areas in the Fields tab.
A Reference field contains the information of an item reference. You can create references manually using a Get Reference step, and they are created automatically using SharePoint, CRM, and SmartObject steps. References make it easier to reuse property values from one or more entities, such as a document, contact, or SmartObject, throughout the workflow. For more information on how to create and use references, see the References topic.
Click on the down arrow of the reference to display fields of the entity. Click and drag a property to use its value for configuring your workflow.
Create and use Variables to hold values for the workflow or an activity. You can create and use variables of different data types, to track information related to your workflow, such as IDs, names, counts, and any other information that you may need to store for the instance of the workflow.
See the following resources for more information:
- See How To: Save a Screenshot to PDF and Attach it to an Email for an example of using a Variable in a SmartField.
- See How To: Modify a Workflow to Link an Application's Start Rule to a Secondary List or Library for an example of using a variable as an input mapping for a reference.
Click on the Add option to create a new variable, and then enter a name.
Click the ellipsis to Rename or Delete it, and to edit the variable's Settings. You can also right click on the variable to access this menu.
Click the down arrow to change the data type.
On the Settings page you can configure the following options:
The following table explains the available options:
Option | Explanation | How to Use |
---|---|---|
Name |
Use this to add the name of the Variable. The name of the Variable displays within the Object Browser. Warning: Duplicate variable names can cause workflow deployment failure. |
Type a name for the variable. |
Data Type |
Use this to specify the data type for the variable. Select from the following options:
|
Select the data type from the menu. |
Description | Use this to add a custom description that describes the variable. | Type a description for the variable. |
Empty Value | Use this to allow an empty value in the variable. If this option is unchecked you can specify an initial value. By default, this option is checked. |
Check the check box to allow an empty value. Uncheck the check box to select an initial value. |
Initial Value |
This value is determined at design time by the developer and exported with the workflow definition. To specify this value, ensure the Empty Value check box is unchecked. The following options are available:
|
Add the initial value by selecting it from the menu or selecting a radio button. |
Hidden in Reports | Use this option to hide the variable from the reporting dashboards. By default the variable is visible. When checking this option, the variable is not available in a SmartForm context such as when using a view, form, or rules. |
Check the check box to turn this option on. |
On Demand | Selecting this option ensures that K2 Server only loads variables when and if required either by reading a value or setting a value in a variable. The data on demand option impacts the performance of K2 Server. | Check the check box to turn this option on. |
Audit |
An audit is kept of all the modified values of the variable. This option is only available if the variable is logged. See this record of changes to the field in the Process Instance Data Audit Report. Warning: If you do not need to audit information, it is best to not turn this option on as it adds data load to the server and database. |
Check the check box to turn this option on. |
Use the Environment fields to include information from your K2 environment into steps, rules, functions, and email notifications.
The following fields are examples of what you might find:
Field | Description | Example |
---|---|---|
This is the CRM server URL entered when you register CRM with the Installer. | URL=[CRMURL];Organization=[CRMORGANIZATION] | |
In K2 Management the Servers node lists the discovered K2 servers in the network, as well as allowing you to retrieve the external IP address of each server. You can use the Lookup* option to retrieve the external/public IP address of a server. The IP address is often used to configure a firewall when connecting K2 to services on a separate network, for example when you want to connect to a Microsoft SQL server with the SQL Server service type, or if you need to set up inbound/outbound traffic rules to allow users or systems in a secured network to connect to the K2 server. The ExternalIPLookupServiceURL field stores the default provider used for the Lookup* option.
|
https://toolbox.googleapps.com/apps/dig/#A/ | |
The email address used by K2 to send email. This is the address that also handles SmartAction responses. | system@k2.local | |
The metadata URL of the K2 OData endpoint. | https://k2.denallix.com/api/odata/v3/$metadata | |
The name of the key setting the OData Web API uses to check if the service is enabled or not. | odata_ENABLE | |
the name of the key setting that the OData Web API uses to check the SmartObjects publication option. | odata_PUBLISH_SMARTOBJECTS | |
The URL of the K2 SmartForms Designer. | http://k2.denallix.com/Designer | |
The URL of the K2 SmartForms Designer runtime site. | http://k2.denallix.com/Designer/Runtime | |
The secure (HTTPS) version of the SmartForms Designer Runtime URL. | https://k2.denallix.com/Designer/Runtime | |
The secure URL of the K2 SmartForms Designer site. | https://k2.denallix.com/Designer | |
The URL of the SmartForms runtime site which renders deployed SmartForms. | http://k2.denallix.com/Runtime/Runtime | |
The secure URL of the SmartForms runtime site which renders deployed SmartForms. | https://k2.denallix.com/Runtime/Runtime | |
The base URL of the Workflow REST API. | https://k2.denallix.com/api/workflow/preview | |
The name of the setting that the Workflow REST API uses to check if the service is enabled or not. | workflow_ENABLE | |
The Swagger URL of the Workflow REST API. | https://k2.denallix.com/api/workflow/preview/swagger | |
The URL of the K2 Workspace. | http://k2.denallix.com | |
The secure URL of the K2 Workspace. | https://k2.denallix.com |
- See Using environment fields in a workflow and switching between environment libraries for information about using environment fields in different environment libraries.