Passing Parameter Values to a Page


When a page includes content with dynamic parameter filters, you can pass parameter values to it from external content to set the filter values when the page initially loads. For example, you can create a chart or report with drill-down links that point to the page, and configure the drilldowns in such a way that the value the user clicks in the chart or report is used as a filter value in the page. This allows users to navigate between content items and determine the scope of the information that they want to see.

If the page is the target of a link tile in another page, parameter values in the source page are passed to the target page automatically if the Attach all parameters option is enabled and the same parameter filters are present. This allows users to see the same set of values in the target page without having to set filter values again.

Parameter values can also be passed to a page using parameter name-value pairs in the run-time URL. The run-time URL uses the following format:

http[s]://hostname:port/context_root/run/path_to_item[?&variable_name1=variable_value1&variable_name2=variable_value2]

where:

hostname

Is the name of the system where WebFOCUS is installed.

port

Is the port number used by WebFOCUS.

context_root

Is the context root used for your WebFOCUS application. For example, ibi_apps.

path_to_item

Is the IBFS path of a page in your WebFOCUS repository. You can find the path of a page by right-clicking it on the WebFOCUS start page or WebFOCUS Home Page and clicking Properties. The file path is listed as the Path property.

Slashes (/) between folder names should be retained literally instead of encoded in the URL, and the colon (:) should be removed after IBFS. For example:

http://localhost:8080/ibi_apps/run/IBFS/WFC/Repository/My_Workspace/~user/example_page
&variable_name1=variable_value1&variable_name2=variable_value2

Are one or more parameter name-value pairs. To pass multiple values to a multiselect parameter in the page, separately list the same parameter name multiple times with each distinct value. For example, the URL,

http://localhost:8080/ibi_apps/run/IBFS/WFC/Repository/My_Workspace/~user/example_page?&TIME_YEAR=2018&TIME_YEAR=2019

passes 2018 and 2019 to the &TIME_YEAR parameter.

Note: If multiple filters in a page use the same amper variable name, for example, if they come from different data sources, the value or values defined in the URL are passed to each of these filters.

Procedure: How to Pass Parameter Values to a Page Using a URL Drilldown

You can drill down from a chart or report procedure to a page created in WebFOCUS Designer. Drill-down parameters can be passed to the page to apply their values to any page filters.

  1. Create and save a page that includes prompted filters. These filters can be created by adding parameterized external content to an assembled page and clicking Add all filters to page in the Filters tab of the sidebar, or can be created in a page with new content by dragging a field to the Filter toolbar.

    The filters in this page will be populated with values passed from a drill-down report.

    For information on creating a page, see Creating Pages.

  2. Create a new report in InfoAssist.

    On the WebFOCUS start page or Home Page, in the Workspaces view, click the INFOASSIST tab on the Action bar and click Report or Chart.

    InfoAssist opens and you are prompted to select a data source.

  3. Select the same data source that was used to filter the page, and click Open.

    The report or chart canvas appears.

  4. Create content that is sorted by the same fields that are used as filters in the page. For example, if the page is filtered by Customer Business Region and Sale Year, create a report with those fields in the row bucket. Add other measures and dimensions to your content based on your needs and preferences.
  5. Select an element of the chart or report to which to add drill-down links.

    If you are passing multiple parameter values through the drilldown, selecting a section of the chart or report that represents multiple sort values may help clarify to the user which values will be passed.

    For example, in the report shown in the following image, the Sale Year field is the secondary sort field while Customer Business Region is the primary sort field, so each row in the Sale Year column represents a sale year and a business region.


    Report with Business Region and Sale Year

    In this case, adding the drill-down links to the Sale Year column would allow you to choose from all of the available Customer Business Region and Sale Year values, whereas adding the links to the Customer Business Region column would only allow you to pass parameter values for the first sale year in each business region group. As an alternative to creating drilldowns on the lower-level sort field, you could ensure that all parameter values are passed from a report by using repeating sort values. On the Format tab, in the Features group, click Repeat Sort Value.

  6. On the Field tab, in the Links group, click Drill Down.

    The Drill Down dialog box opens.

  7. Change the drill-down type to a URL drilldown by selecting the Web Page radio button.
  8. In the URL text box, type the run-time URL for the target page, without the parameters, using the format described above.

    The URL format should resemble the following:

    http[s]://hostname:port/context_root/run/path_to_page

    You can get the path to the page by right-clicking it on the start page or Home Page and clicking Properties. It displays as the Path property. When you add it to the run-time URL for the drilldown, remember to remove the colon (:) after IBFS.

  9. In the Description text box, type the name of the drilldown. This name displays in the tooltip from your content.
  10. In the Target drop-down menu, select the location where the target page should run. It can be in a new tab, the same window where the report was run, or a user-specified location.
  11. In the Parameters section, click Add Parameter to create a parameter to pass to each filter on the target page that you wish to populate.
    1. In the Name text box, type the name of the parameter. Typically, this matches the field name. You can check the parameter names used in an assembled page by clicking the Info button.
    2. From the Type menu, choose whether the value to pass should be the field value associated with the user drill-down link selection, or a constant value.
    3. If you selected Field, use the Value menu to select a field from your content. If you selected Constant, type a constant value to pass to the page.
  12. Repeat step 11 for all parameters whose values you want to pass to the target page, then click OK to create the drilldown.

    In a report, drill-down links are added for each value of the field where the drilldown was created. In a chart, you can access drill-down links in a tooltip at run time.

  13. Run the chart or report.
  14. At run time, drill down to the target page.
    • If you created a chart, point to a section of the chart and click the drill-down link in the tooltip.
    • If you created a report, click a drill-down link. If that field of the report has multiple drilldowns associated with it, select the drilldown that you just created.
  15. The page opens in a new browser tab or window. Notice that the value or values represented by your selection in the parent content item are applied as filter values in the page.