Creating Global Filters

In this section:

A Global filter enables you to link and filter several items of content with a single control. This creates a dynamic view that allows quick access to the correct portion of data. To build a Global Filter, you need to perform the following:

  1. Create Parameters. Create Where statements, which you will later use to build controls.
  2. Create Controls. Create selection controls for your filter.
  3. Set Trigger Actions. Configure a trigger action for each control.
  4. Apply a Global Filter to a Portal. Incorporate a Global Filter into a portal layout and apply it to existing parameterized content.

To create a Global Filter, you will need access to a WebFOCUS desktop product, such as App Studio or Developer Studio. This example uses WebFOCUS App Studio.


Top of page

x
Step One: Creating a Parameter

How to:

In this step, you create a parameterized report, using the Report canvas in WebFOCUS App Studio.



x
Procedure: How to Create a Parameter in App Studio
  1. Launch WebFOCUS App Studio.
  2. In the Environment Tree panel, in the Content node, right-click a folder, point to New, and then click Report.

    The Report Wizard opens.

  3. Click Next.
  4. Select a Master File. In this example, we use wf_retail_lite.mas.
  5. Click Finish.
  6. On the Report tab, in the Filter group, click Filter, and then click Where.

    The Expression Builder opens.

  7. In the Data section, double-click a field that you want to use as a first parameter.
  8. In the Expression Grid, make the following selections:
    1. equals from the Logical Relation column
    2. Parameter (Dynamic) from the Compare Type column
  9. From the Data section, draft a field that you want to use as a second parameter to the (Where) section.
  10. In the Expression Grid, make the following selections:
    1. equals from the Logical Relation column
    2. Parameter (Dynamic) from the Compare Type column

    The following image shown an example of the completed expression, with Product,Category and Product,Subcategory as parameters.

    Expression Builder dialog box

  11. Click OK.
  12. Save and close the report.

Top of page

x
Step Two: Creating a Control for a Global Filter

How to:

In this step, you will build a selection control, which will be based on the parameter you created in Step One: Creating a Parameter. To do this, you will use the HTML canvas in WebFOCUS App Studio.



x
Procedure: How to Create a Control for a Global Filter
  1. In the Environments Tree panel, right-click a folder, point to New and then click HTML/Document.

    The HTML/Document Wizard opens.

  2. Click Finish.
  3. In the Properties panel, under Page properties, set Theme to Plain.
  4. In the Requests and Data sources panel, click New, then click Requests->Parameters->Controls, as shown in the following image.

    Requests and Data sources panel

    The Open file dialog box opens.

  5. Select the report that you created in Step One: Creating a Parameter, and click Open.

    The New Parameter dialog box opens.

  6. In the Control Type column of each parameter, right-click, and then click List box.
  7. From the Parameter grouping options drop-down list, select Do not create a form.
  8. Select the Don’t create run button check box.

    New Parameters dialog box

  9. Click OK.

    The canvas refreshes and displays your controls.

  10. Right-click the outer container around the controls, and then click Delete Container Only, as shown in the following image.

    Delete Container Only option

  11. Using the Properties panel, make the following formatting changes:
    1. Label1
      • Width: 115px
    2. Listbox1
      • Width: 115px
      • Height: 140px
    3. Label2
      • Width: 115px
      • Left: 15px
      • Top: 200px
    4. Listbox2
      • Width: 115px
      • Left: 15px
      • Top: 220px
      • Height: 170px

    The following image shows the completed layout.

    HTML/Document canvas

    You can double-click control labels and edit the text.


Top of page

x
Step Three: Setting Trigger Actions

How to:

In this step, you will configure trigger actions for each control using the Tasks & Animations panel in WebFOCUS App Studio.



x
Procedure: How to Set Trigger Actions for a Global Filter
  1. In the Tasks & Animations panel, click the New button.

    A new task, labeled task2, is added to the list of tasks.

  2. In the Trigger Type drop-down menu, click Selection Changed.
  3. Click the icon under Trigger Identifier, and click All, as shown in the following image.

    The Trigger Identifier section is populated with listbox1 and listbox2.

  4. Select the listbox1 and listbox2 check boxes.
  5. Click the drop-down arrow next to the Request Selections button, and then click Refresh.

    A new refresh request, labeled Refresh1, displays in the Requests/Actions section.

  6. In the Target type drop-down menu, click Refresh BI Portal.
  7. Select All pages of portal radio button.

    The following image shows the completed fields.

    Tasks & Animations panel

  8. Save and close the HTML page.
  9. Close WebFOCUS App Studio.

Top of page

x
Step Four: Applying a Global Filter to a Portal

How to:

In this step, you will incorporate a Global Filter into a Portal and apply it to the existing parameterized content.



x
Procedure: How to Apply a Global Filter to a Portal
  1. Sign in to WebFOCUS as a designer or administrator.
  2. In the Resource tree, right-click the Portals node, then click New Portal.

    The New Portal dialog box opens.

  3. Populate the fields of the New Portal dialog box.

    For more information on creating a new portal, see Launching the Portal Designer.

  4. Click Create.

    The Portal Designer opens.

  5. Click the page canvas to select it.
  6. On the Layout tab, in the Portal group, click Banner.

    The Choose Banner Areas dialog box opens.

  7. Click Left, and close the Choose Banner Areas dialog box.

    The left banner is added to the page.

  8. Click the banner to select it.
  9. On the Insert tab, in the Content group, click WebFOCUS Resources.

    The Resource tree opens.

  10. Drag the HTML page that you created previously into the left banner.
  11. Click inside the panel to select it.
  12. In the Properties panel, set Height to auto.

    The following image shows a banner with the filter controls.

    Banner with Global Filter controls

  13. Populate the page canvas with content, such as charts, reports, or visualizations.

    Note: For the Global Filter to work, the content must contain the same parameters as the ones you used for the filter controls.

  14. Run your portal controls to see changes in your content from the select values.
  15. Save your Portal.

    You can run, publish, or share your Portal.


WebFOCUS