Filtering Example

Let's show how to configure filters on a specific example. Suppose we need to get Salesforce accounts with Customer - Direct or Customer - Channel types, added in the previous month. We can do it in two ways - with standard value filters or with list and relative filters. Using relative and list filters in this case is more convenient, however we show both ways in order to demonstrate using value filters and filter subgroups. With value filters we can create the query in the following way:

ExpandedToggleIcon        Value Filters

1.On the Query page, click New Builder if there are no open queries. If there are open queries, click the query-icon-plus button and then click Builder on the Query toolbar in order to create a new query.
2.Click Select connection and select the connection to Salesforce.
3.Drag the Accounts table from the Connection Object List to the Result fields pane.
 
query-filter-tutorial-1_1
4.Click the Accounts table in the Connection Object List to access its fields.
5.From the Connection Object List drag the CreatedDate field to the Filters pane.
6.Click the CreatedDate field on the Filters pane.
7.On the Details pane click equal to and then click between.
 
query-filter-tutorial-2-big
8.Specify the start and end date of the previous month in the corresponding boxes.
 
query-between-filter
9.In the Filters pane click All.
10. Now we need to specify the filter conditions for selecting records with Customer - Direct or Customer - Channel types. Note that we select records with any of these values, so we need to create a filter subgroup, which is satisfied if any of its conditions is met. For this, in the Details pane click +Add subgroup.
 
query-filter-add-subgroup
11. In the Details pane click All in the added subgroup, and then click Any in the Details pane.
 
query-filter-subgroup
12. From the Connection Object List drag the Type field to the new filter group in the Filters pane.
13. Click this field in the Filters pane. The equal to filter is selected in the Details pane by default, so we need only to enter the necessary value Customer - Direct to the box.
 
query-filter-tutorial-3_1
14. Repeat the steps 12 and 13 for the Customer - Channel value.

After this our query is ready. It looks like the following in the editor:

query-filter-tutorial-4_1

 

ExpandedToggleIcon        List and Relative Filters

With our List and Relative filters, the same query can be created in the following way:

1.On the Query page, click New Builder if there are no open queries. If there are open queries, click the query-icon-plus button and then click Builder on the Query toolbar in order to create a new query.
2.Click Select connection and select the connection to Salesforce.
3.Drag the Accounts table from the Connection Object List to the Result fields pane.
 
query-filter-tutorial-1_1
4.Click the Accounts table in the Connection Object List to access its fields.
5.From the Connection Object List drag the CreatedDate field to the Filters pane.
6.Click the CreatedDate field on the Filters pane and then click Relative on the Details pane.
7.Then click Previous month in the Details pane.
 
query-filter-relative
8.From the Connection Object List drag the Type field to the Filters pane.
9.Click the Type field on the Filters pane and then click List on the Details pane.
10. Select check boxes for the Type values to query rows with. In our case these are Customer - Direct and Customer - Channel values. If the necessary values are not displayed, click Load more in the end of the check box list to load more values from the data source.
 
query-list-filter

That's all, our query is ready. It looks like the following in the editor:

query-filter-tutorial-4_2