Designers > K2 Designer for Visual Studio > Design Tools > Toolbox > Event Wizards > Create Reference Event Wizard > Create Reference Wizard Event | Send feedback |
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 a rule to return data to display on a Form or the need to define data field in the workflow to use at a later stage in the workflow.
The Create Reference workflow step can be used in any scenario where an item reference needs to be created for use within a workflow. This wizard is typically used with the For Each wizard to convert the data returned into a list of items. For more information about this scenario see the Considerations section.
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 allows you to specify parameters and filters to return data dynamically. Applying parameters and filters is optional. Parameters are specific to the SmartObject method and may be required or optional.
The filter feature has a big impact on query performance as filtering is done on the server. 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 option can apply filtering even if the Service Object does not handle the filter. For most SmartObjects, the filter is generated using a SQL statement executed by the broker. For other SmartObjects if the Service Object cannot implement the filter, the wizard applies the filter on the final result set of the data, meaning all data is retrieved from the server and the data is filtered after the query completes.
The following example shows how filters are 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 |
---|---|---|
Field Name | List of parameter names | N/A |
Field Type |
Displays the Field Type |
ID = Autonumber |
Field 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: