19 Introduction to Filters
In this section you will learn how to use filters on a view. This section contains:
When you create filter conditions, you can set them to be:
Where ALL of the following are true This is equivalent to a Boolean AND. All of the conditions must be true for a record to pass the filter.
Where ANY of the following are true This is equivalent to a Boolean OR. Any one condition can be true for a record to pass the filter.
Prepare data
To prepare the data for this exercise we will need to run the task plan Run User Models.
In the Repository, under the Analysis Training application, use the chevron next to
to view the Task Plans.Run the task plan
Run User Modelsby right clicking on it and pressing.
Now open the view you will filter:
In the Repository, under the Analysis Training application, find the table
Customer Banking Details.Expand the
Views section.In the list of views, right-click on the view
Account Number Fix.In the popup menu, select
Display. PhixFlow opens the view in the workspace.
Apply a pre-configured filter
In the view toolbar, click on
. PhixFlow opens a drop-down list of preconfigured filters.From the drop-down list, select
Account Number Not OK.The grid view changes to show only those records where
AccountNumFormatCheckisNOT OK.
Edit a pre-configured filter
You will now filter the same view for an individual customer, using CustRef.
In the view toolbar, the filter icon now looks like this,
to show that a filter has been applied.Click
and from the drop-down list, selectfor CustRef.The view changes to show a single record, where
CustRefisCR220201-2.This filter was pre-configured to select for thisCustRef.You will now edit this filter to select for the customer with reference
CR220206-3:Click
, then right-clickfor CustRef.From the popup menu, select
filter. PhixFlow opens a filter window.Replace
CR220201-2withCR220206-3Click Apply and Save.
The view now shows a single record, for the customer with reference
CR220206-3.
Remove a filter
You will now remove the currently applied filter.
In the view toolbar, click
.From the drop-down list, click
.The View changes to show the full set of records in the data grid.
Add a new filter
You will now add a new filter, to show only customers whose customer reference starts CR32:
In the view toolbar, click
.In the drop-down list, click
.In the filter window, add a new filter condition:
Set Name to
CustRef starts CR32.Leave Where ALL of the following are true as it is.
Click Select an option to display the drop-down list and select
Cust Ref. PhixFlow adds fields for you to set the filter condition.
Clickequalsto display the drop-down list and selectstarts withIn the last condition field, enter
CR32.Click Apply and Save to save the filter and close the filter window.
The view now shows three records.
Filtering with AND conditions
You will edit the filter you created above, to filter for customers whose customer reference starts CR32 and whose bank account number ends with 86. To apply several conditions do the following:
In the view toolbar, click
.In the drop-down list, right-click
CustRef starts CR32and selectfilter.In the filter window, hover your mouse over Where ALL of the following are true and click the
button.Click Select an option to display the drop-down list and select
Bank Account Num.Click equals to display the drop-down list and select
ends with.In the last condition field enter,
86Click Apply and Save to save the filter and close the filter window.
The view now shows only one record.
Delete a filter condition
You will delete the filter condition you added above:
In the view toolbar, click
.In the drop-down list, right-click
CustRef starts CR32and selectfilter.For the condition
BankAccountNumends with 86, clickFilter Item.Click Apply and Save.
The view now shows three records again.
Filtering with OR conditions
You will edit the filter you created above, to filter for customers whose customer reference starts CR32 or CR42:
In the view toolbar, click
.In the drop-down list, right-click
CustRef starts CR32and selectfilter.Change Where ALL of the following are true to Where ANY of the following are true
Click
next to Where ANY of the following are true and click thebutton.Add a new condition:
Cust Refstarts withCR42Click Apply and Save.
The view now shows four records.
Temporary filters
Sometimes you will want to quickly filter a grid without saving your filter. You will do this now to filter the grid to show only records where there is a value in the column SuggestedAccountNumber – that is, where SuggestedAccountNumber is not null:
In the view toolbar, click
.Click
.Leave the Name field blank.
In the filter window, add a new condition:
SuggestedAccountNumberis not null.Click Apply to apply the filter without saving.
Click Close (top right) to close the filter window.
The view now shows three records, each with a value in SuggestedAccountNumber.