19 Introduction to Filters
- Chris Welford
- Zoe Baldwin
- Anthony George
- Fiona Sargeant (Unlicensed)
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 Task Plan to view the Task Plans.
- Run the task plan
Run User Models
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 Filter. 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
AccountNumFormatCheck
isNOT 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, Filter Applied to show that a filter has been applied.
- Click Filter Applied and from the drop-down list, select
for CustRef
. - The view changes to show a single record, where
CustRef
isCR220201-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 Filter Applied, then right-click
for CustRef
. - From the popup menu, select Edit filter. PhixFlow opens a filter window.
- Replace
CR220201-2
withCR220206-3
- Click 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 Filter Applied.
- From the drop-down list, click Clear Applied Filter.
- 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 Filter.
- In the drop-down list, click Create Filter.
- 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.
Clickequals
to display the drop-down list and selectstarts with
- In the last condition field, enter
CR32.
- Click Apply and Save to save the filter and close the filter window.
- Set Name to
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 Filter Applied.
- In the drop-down list, right-click
CustRef starts CR32
and select Edit filter. - 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,
86
- Click 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 Filter Applied.
- In the drop-down list, right-click
CustRef starts CR32
and select Edit filter. - For the condition
BankAccountNum
ends with 86, click Delete Filter 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 Filter Applied.
- In the drop-down list, right-click
CustRef starts CR32
and select Edit filter. - 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 the Create New button.
- Add a new condition:
Cust Ref
starts withCR42
- Click 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 Filter Applied.
- Click Create Filter.
- Leave the Name field blank.
- In the filter window, add a new condition:
SuggestedAccountNumber
is 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
.