K2 BLACKPEARL PRODUCT DOCUMENTATION: USER GUIDE
SmartObject Filter

K2 Studio - SmartObject Filters

The SmartObject Filter feature enables the user to specify a filter when using List Methods on a SmartObject. This feature is accessed when a user adds a SmartObject property to a K2 field in a wizard.  When a SmartObject Single Method is used, the user is required to supply input values and specify which properties to be returned. When a SmartObject List Method is used, the user is required to specify filters for the method and properties to be returned.

Filtering depends on the Service Object, but the SmartObject 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.

The SmartObject 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 comply are returned.

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. See the  SmartObject Filtering scenario.

Fig. 1. SmartObject List Method - Filter

Using Parameters and Filters

Method Parameters can be configured to be used as Input Mappings. This allows for dynamic data results to be returned. Parameters and Input Properties can be required or optional. They are grouped together in the User Interface and called Input Mappings. Parameters are listed first, then properties. Parameters are dependent on the Service Object it is mapped to. Parameters can be used in conjunction with Filters to minimize the results returned. Shown below is a Date Parameter used as an Input Mapping. This parameter will be used in conjunction with filters configured on the Filter screen of the SmartObject Wizard.

Fig. 2. SmartObject Wizard - Input Mapping

Considerations

The following need to be considered when using Parameters in conjunction with Filters to minimize the results returned:

See Also

 

 


K2 blackpearl Help 4.6.10 (4.12060.1690.0)