Designers > K2 Studio > Working with SmartObjects > SmartObject Integration > SmartObject Filter > SmartObject Filter - Using List Method | Send feedback |
The following example shows how a SmartObject method can be used to filter data by using the SmartObject List Method.
While using the E-mail Event, click on the ellipse to open the Context Browser on the Message Body screen. Open the List Method and drag the Get List Method into the Message Body. The SmartObject Wizard will open.
Fig. 5. SmartObject List Method
The Filter screen opens. A Filter can be applied to minimize the number of records that will be returned upon execution of the activity. Click on Add to add a filter.
Fig. 6. Filter screen
Feature | Description | How to use it |
---|---|---|
Add | Adds a new instance of a filter | Click Add to add a new instance of a filter |
Insert | Inserts a new instance of a filter above the filter that is currently selected | Select a filter, then click Insert |
Remove | Removes an existing instance of a filter | Select a filter, then click Remove |
Group | Groups two or more instances of a filter together | Select the instances and click Group |
UnGroup | Undo the grouping of instances of a filter | Select the instances and click UnGroup |
To provide more clarity on the application of the filters, the following Expressions have been configured. In this instance, expressions 1 and 2 have been grouped to be evaluated together and expression 3 to be treated separately. In mathematical terms this would relate to the following:
(Amount < 10000 AND > 1000) AND Description = Stock
Fig. 7. Add and Group Filters
Click Next to specify the Return property
Fig. 8. Select Return property
Click Finish, then complete the E-mail Event wizard.
Fig. 9. SmartObject Method listed