Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Linking Views using a background filter

Data is displayed in PhixFlow using views. The grid and the card container are both considered types of views. At present, the Employee card container is showing all employees and ideally we only what to show those associated with the company selected on the Companies grid. We will achieve this using a filter.

We will create a background filter as follows:

  1. Make sure your screen is unlocked.
  2. Drag Company ID from the grid onto the card container. 
  3. Confirm you want to create a background filter by clicking Yes on the pop up box.
  4. Select Company ID from the drop down and click Confirm.
    1. The prompt is for us to select which attribute on the card container we want to compare to the Company ID we just dragged across.
  5. The background filter is created and applied automatically. The filter properties open on the right.
  6. In the properties pane, change the Name to Selected Company.
  7. Click  Apply.

Filter Explanation

  1. Filter Details: here is an overview of the filter details, for more information see Filter.
  2. Our Clause, Companies.CompanyID, is referencing the component on the screen called Companies and its attribute CompanyID. One very important factor here is that our clause is set to be an expression. 
    1.  Literal Value indicates the value is expected to be a string. Click this icon to switch to an expression.
    2.  (Expression String) indicates the value is expected to be an expression. Click this icon to switch to a string.

Accessing the Filter

The filter we created is owned by the card container. This means to access the filter we navigate to it through the card container.

  1. Click on the Employees card container in the Layers section or click on the card container header on the screen, to open its properties.
  2. Expand the Background Filter Rules, here we see a list of all background filter rules applied to the card container.
  3. Double-click on any rule to open it. For our example, double-click Selected Company.
  4. We see the Filter Rule. This is the condition that needs to be satisfied in order for the Filter to be applied. Our example is blank, this means it will always be true and therefore apply the background filter. However, we can create a filter condition using PhixScript. We will see examples of this later in the course.
  5. We also have the option to disable the filter here by unticking the Enabled check box. This is helpful if debugging.
  6. There is also the option to Stop if True. If ticked, if this filter rule is true, no filter rules after this one will be checked.
  7. To open the filter we created click the Filter hyperlink above the filter name.
  8. Close the Filter and Filter Rule.
  9. Switch to  Application Mode and when you select different companies in the grid the associated employees will be displayed.
  10. Switch back to  Design Mode.
  • No labels