19 Introduction to Filters

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.

  1. In the Repository, under the Analysis Training application, use the chevron next to

     to view the Task Plans.

  2. Run the task plan Run User Models by right clicking on it and pressing 

    .

 

Now open the view you will filter:

  1. In the Repository, under the Analysis Training application, find the table Customer Banking Details.

  2. Expand the

    Views section.

  3. In the list of views, right-click on the view Account Number Fix.

  4. In the popup menu, select 

    Display. PhixFlow opens the view in the workspace.

Apply a pre-configured filter

  1. In the view toolbar, click on 

    . PhixFlow opens a drop-down list of preconfigured filters.

  2. From the drop-down list, select Account Number Not OK.

  3. The grid view changes to show only those records where AccountNumFormatCheck is NOT OK.

Edit a pre-configured filter

You will now filter the same view for an individual customer, using CustRef.

  1. In the view toolbar, the filter icon now looks like this,  

     to show that a filter has been applied.

  2. Click 

     and from the drop-down list, select for CustRef.

  3. The view changes to show a single record, where CustRef is CR220201-2.This filter was pre-configured to select for this CustRef.

  4. You will now edit this filter to select for the customer with reference CR220206-3:

  5. Click 

    , then right-click for CustRef.

  6. From the popup menu, select 

     filter. PhixFlow opens a filter window.

  7. Replace CR220201-2 with CR220206-3

  8. Click Apply and Save.

  9. 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.

  1. In the view toolbar, click 

    .

  2. From the drop-down list, click 

    .

  3. 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:

  1. In the view toolbar, click 

    .

  2. In the drop-down list, click 

    .

  3. In the filter window, add a new filter condition:

    1. Set Name to CustRef starts CR32.

    2. Leave Where ALL of the following are true as it is.

    3. Click Select an option to display the drop-down list and select Cust Ref. PhixFlow adds fields for you to set the filter condition.
      Click equals to display the drop-down list and select starts with

    4. In the last condition field, enter CR32.

    5. 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:

  1. In the view toolbar, click

    .

  2. In the drop-down list, right-click CustRef starts CR32 and select 

     filter.

  3. In the filter window, hover your mouse over Where ALL of the following are true and click the 

     button. 

  4. Click Select an option to display the drop-down list and select Bank Account Num.

  5. Click equals to display the drop-down list and select ends with.

  6. In the last condition field enter, 86

  7. 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:

  1. In the view toolbar, click 

    .

  2. In the drop-down list, right-click CustRef starts CR32 and select 

     filter.

  3. For the condition BankAccountNum ends with 86, click  

     Filter Item.

  4. 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:

  1. In the view toolbar, click 

    .

  2. In the drop-down list, right-click CustRef starts CR32 and select 

     filter.

  3. Change  Where ALL of the following are true to Where ANY of the following are true

  4. Click

     next to Where ANY of the following are true and click the 
     button.

  5. Add a new condition: Cust Ref starts with CR42

  6. 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:

  1. In the view toolbar, click 

    .

  2. Click

    .

  3. Leave the Name field blank.

  4. In the filter window, add a new condition: SuggestedAccountNumber is not null.

  5. Click Apply to apply the filter without saving.

  6. Click 

    Close (top right) to close the filter window.

The view now shows three records, each with a value in SuggestedAccountNumber.