Create Reference Wizard
What does it do?
The Create Reference wizard generates dynamic item references against a SmartObject which can be used across different line of business applications. An item reference is an XML structure that contains all the information of the specific SmartObject. The Create Reference wizard automatically binds the SmartObject data to the workflow making it easier and quicker to design a workflow. This eliminates the need to manually configure certain rules such as the rule to return data on a Form at approval and the need to define each Data Field.
How is it used?
The Create Reference workflow step can be used in any scenario where an item reference needs to be created for use within a workflow to return data. This wizard is typically used with the For Each wizard to convert the data returned into a list of items, see the Considerations section.
Wizards can be edited. For more information see Edit Wizards.
Provide the SmartObject and reference detail to use when the reference is created.
| Field | Description | Sample Value |
|---|---|---|
| SmartObject | The SmartObject used to create a reference | Click on the ellipsis and select a SmartObject from the category system |
| Method | The SmartObject selected populates the Method drop down with methods. Select the appropriate method used to return data |
Select a method from the drop down list:
|
| Identifier | The selected method populates the Identifier drop down. The key property used to retrieve records from the SmartObject is by default the Identifier. The Identifier field only displays when the SmartObject does not contain a Key property and requires manual selection | Select an identifier from the drop down list |
| Reference | The name of the Reference to be created. The field is auto populated using the name of the SmartObject selected. Specify another name if desired | Type text in the field |
The Create Reference wizard provides the ability to specify parameters and/or filters to return data dynamically. Applying parameters and filters is optional. Parameters are dependent on the Service Object it is mapped to.
The filter feature has a big impact on reporting query performance as all records are not returned. If a filter has been applied, records are filtered according to the filter criteria and only those records that match the filter are returned.
Filtering depends on the Service Object, but the filter has a mechanism to apply filtering, even if the Service Object does not handle the filter. For native integrated services, the filter will apply as part of the generated SQL statement executed by the broker. For non-integrated services, if the Service Object cannot implement the filter, the SmartObject server will apply the filter on the final result set of the data.
One example is of you implement filtering on a service object such as the SharePoint broker, it will only request the filtered data from the SharePoint server. If it is not implemented natively in the broker it will work as follows: All the data will be requested from the backend, i.e. SharePoint, and returned to the server and then the SmartObject stack will apply the filter criteria to the data and only return filtered data.
The following example shows how filters can be applied to the results of a SmartObject List method. Filters can be logically joined by using And and Or. Filters can also be grouped.
| Field | Description | Sample Value |
|---|---|---|
| Search | The search criteria to be used to minimize the fields displayed. It is useful to search for a specific field using the search criteria when having lots of fields to select from. The list of fields automatically refreshes when text is entered | Type text to minimize the fields |
| Show |
|
Select the required option |
| Name | List of parameter names | N/A |
| Value | Parameter value. This value can be set using text or dropping a field from the Context Browser | Type text or drag and drop a field from the Context Browser |
| And/Or | And and Or logical operators to be used in the expression | Select the required option |
| Left | Value on the left of the expression. The values are determined by the SmartObject fields | Select a value from the drop down list |
| Operator | Operators used to compare the left and right values of the expression | Select an option from the drop down list |
| Right | Value on the right of the expression. SmartObject fields are listed in the drop down. In addition, values can be typed of dropped from the Context Browser | Select a value from the drop down list, type text or drag and drop a field from the Context Browser |
-
It is important to take note of the following when using the filter feature:
- Using input mappings is critical if a large number of records exist in the backend system. The more records you can filter-out before the results are returned to K2 the better the performance will be.
- If items are filtered out of the result set that is expected by using parameters, the filters applied may not work properly. As a troubleshooting tip, supply parameters only, look at the result set first, then go back and apply a filter to the result set that is returned.
- The Create Reference wizard can be used with the For Each wizard as outputs are displayed as a flat list which is converted to a list of items within the For Each wizard.