As you create charts and styled tabular content in WebFOCUS Designer, you may want to narrow the display of information that is shown. You can do this by creating filters for fields in your data source. You can also use filters as a way to create custom displays of the data that you show in your content. For example, you may only want to show revenue information for specific product categories and models in a given year, or for product categories that exceed a certain revenue value.
Filters in WebFOCUS Designer can utilize one of two behaviors: static and prompted filtering. Static filters are applied to individual content items at design time, and allow you to apply consistent filter values to a chart or report. Prompted filters, on the other hand, allow users to select the filter values to use in your content at run time. When you create a new prompted filter, it affects all new content on the page. In addition to adding prompted filters to new content, when existing content using a prompted filter is added to a page, you can create automatic filter controls that can be used at run time. Any content that uses the same parameters can be filtered using the same control. These controls are not generated for static filters.
To create a static filter for a selected field, drag it from the Fields tree on the Resources panel to the Filter bucket, which is located below the field container buckets on the Properties panel when you select a content item. When you create a static filter, the Add Filter dialog box appears, as shown in the following image.
You can select filter values and the relationships those values have to the data that you want to display in your chart or report. Static filters can only be created for new content.
Click the resulting label on the Filter toolbar to open a control, from which you can select default filter values. Users will be able to change the selected value at run-time.
Filters allow you to limit the data that displays in your content, making it easier to find useful information by removing extraneous data values. You can create prompted filters, which allow users to select the filter values to use in your content at run time, or you can create static filters, which are always applied to your content whenever it is run. Prompted filters allow you to create controls when the content that uses them is added to an assembled page, while static filters do not. Additionally, prompted filters affect all new content on the page, or any referenced content that uses the filter. Static filters, on the other hand, affect only the item for which the filter was created.
Static filters are a good choice when you want the same filter values to be applied to your content at all times, or want to create a filter that only affects a single content item.
To create a static filter, when creating a new chart or report, drag a field into the Filters bucket on the on the Settings tab of the Properties panel. The Add Filter dialog box opens, and presents options relevant to the type of field that you are filtering.
These options also differ depending on whether you are filtering compared to selected values or to another field. You can change this option by setting the Compare to option to Value or Field.
When you set the Compare to option to Value you can filter alphanumeric fields using the following options:
Click Load values from data to display all available values from the selected field in the left list. Select one or more values and click Add to add them to the list of selected filter values on the right. To remove a value from the list of selected filter values, select one or more values and click Remove. You can also click Clear List to remove all selected values.
Click Load values from file to select a data file and display all available values from it in the left list. Select one or more values and click Add to move them to the list of selected filter values on the right. To remove values from the list of selected filter values, select one or more values and click Remove, or click Clear List to remove all values.
The Add Filter dialog box when filtering an alphanumeric field is shown in the following image.
When you set the Compare to option to Value, you can filter numeric fields using the following options:
You can type a value that is outside the range of values in your data. In this case, the text box displaying the value is outlined in purple and a message indicates that the value is out of range.
Click Load values from data to display all available values from the selected field in the left list. Select one or more values and click Add to add them to the list of selected filter values on the right. To remove a value from the list of selected filter values, select one or more values and click Remove. You can also click Clear List to remove all selected values.
Click Load values from file to select a data file and display all available values from it in the left list. Select one or more values and click Add to move them to the list of selected filter values on the right. To remove values from the list of selected filter values, select one or more values and click Remove, or click Clear List to remove all values.
The Add Filter dialog box when filtering a measure field is shown in the following image.
When you set the Compare to option to Value, you can filter date fields using the following options:
Click Load values from data to display all available values from the selected field in the left list. Select one or more values and click Add to add them to the list of selected filter values on the right. To remove a value from the list of selected filter values, select one or more values and click Remove. You can also click Clear List to remove all selected values.
Click Load values from file to select a data file and display all available values from it in the left list. Select one or more values and click Add to move them to the list of selected filter values on the right. To remove values from the list of selected filter values, select one or more values and click Remove, or click Clear List to remove all values.
The Add Filter dialog box when filtering a date field is shown in the following image.
Set the Compare to value to Field to filter the selected field in relation to another field in the request. For example, you could use this filter to identify values for which the revenue was less than the cost of goods sold. When filtering by compared field values, the following options are available:
The Add Filter dialog box when filtering a numeric field by comparison to another field is shown in the following image.
In this section: |
As you create charts or styled tabular content in WebFOCUS Designer, you may want to narrow the display of information that is shown. You can do this by creating filters for data fields in your content. You can also use filters as a way to create custom displays of the data that you show in your content. For example, you may only want to show revenue information for specific product categories and models in a given year.
Prompted filters can be created for external content added to a page, in which case any parameters in that content can be added as filter prompts, or for new content, in which case the filter affects all new content on the page.
When you add filtered content to a page, you can open the Filters tab on the sidebar and click Add all filters to page to add the filters to the page automatically, providing interactive controls that your users can choose from to change the view of data available to them. Filtered content can also be kept stand-alone, and you can choose to enable parameter prompting, which requires a user to make a selection before the content displays. There is no limit to the number of filters that you add, however, as you add more than five filters, all filters may not fit on your screen. If you are using a carousel filter layout, used for prompted filters added to new content, you can use the arrow control to scroll over to see any filters that are not visible in the Filter toolbar, as shown in the following image.
If you are using a columnar layout, which is used for a visualization assembled from existing content, then filters are split into additional rows as they exceed the number of columns on the page, as shown in the following image.
Note: You can add data fields to the filter toolbar even if you do not have it displayed in your view.
You can remove filters from the filter toolbar by clicking the X in the upper-right corner of the filter, or by right-clicking the filter and then clicking Delete.
You can create a maximum of one filter per measure field, and a maximum of two filters per dimension field, for individual dimension field values and for an aggregation of the dimension field. The aggregation of a dimension field can be a count, count of distinct values, or a percent of count. You can create an aggregated dimension filter by adding the dimension to your content as a measure, right-clicking the aggregated field in a measure bucket, and then clicking Add to filter toolbar. If you right-click a field that already has a filter and click Add to filter toolbar, or drag it into the filter toolbar, the existing filter control expands for you to select filter values.
Once you have created filters, you can click them to select default data values and set selection options for each filter. For example, when you create a filter using a dimension, it lists the available data values. You can then select the default filter values, as shown in the following image.
By default, no values are initially selected in the list control, which means that all values are displayed by default. To select default values, you click the filter control, and begin clicking the data values that you want to use as the default, then click outside the filter control area to apply the selection.
If you select one or two values, each selected value is listed by name in the filter control. If you select three or more values, the filter control shows the number of values selected out of the total number of available values. If no values are selected, the filter control says All. All available filter values are reflected in your content. If you select all listed values or click Select all, then the filter indicates that n of n values are selected. If the values in the field change in the data source, then the filter does not dynamically update to include them like it would if no values had been explicitly selected.
The selected values are displayed in the chart at run time by default, and users can select other values to display them.
Note: In charts, reports, and visualizations with new content, drop-down list controls and slider controls have a default record limit of 5000 values. Values beyond this limit are not available for selection in the filter control. There is no record limit for filters in visualizations assembled from existing content, or in calendar controls.
You can change this record limit from the Administration Console, on the Other page of the Configuration tab, using the Designer/InfoAssist record limit setting. You can increase or decrease the record limit, or set it to 0 to display all values in filter controls. Displaying all values may result in performance issues, however.
When multiple prompted filters for alphanumeric dimension fields are created in a visualization created with new content, they are chained in all directions, by default. This means that the selection from one prompted filter control automatically filters and updates the available values in the other controls, so they only display relevant values. This ensures that you cannot select filter values that result in no data displayed in the visualization. You can change the chaining setting from multidirectional chaining to hierarchical chaining, or turn chaining off, from the Filter options menu.
In pages assembled from existing content, chaining is unidirectional, applied only to filters lower in the chaining hierarchy than the filter for which you selected values. Filters for fields in the same hierarchy are chained automatically, and you can drag a field onto another field in the filter list in the Filters tab to manually make it a child of that filter for chaining purposes. For more information about filter chaining in new content and pages assembled from existing content, see Chaining Filter Control Selections.
When creating prompted filters for new content, you can choose to exclude data values from the list. To do this, right-click the filter and select Exclude. The not equal icon is added to the filter label to indicate that the selected values are excluded. You can then click the filter control again, and begin clicking the data values that you want to exclude from the list, as shown in the following image. Once you have selected the data values that you want to exclude, your chart refreshes. At run time, instead of choosing which values to display in the chart, users select values to exclude from the chart.
You can also set a prompted filter for new content to use a single value instead of multiple values. If you right-click a prompted filter for new content and click Single, when you click the filter control again, you are only able to select a single value. In filters for existing content, you will have already defined whether or not the filter is multiselect or single-select.
If you add a filter using a numeric field, such as a measure, (for example, Cost of Goods), you can use a slider to adjust the range of data values that display, as shown in the following image.
Click the filter, and use the slider options on either side to modify the range of data values. You can set a range using both ends of the slider. To select a single value, set both ends of the slider to the same value.
The filter for a numeric field is applied after aggregation by default. That means that the filter is applied based on summed values for all sort values in the chart instead of filtering each row of the data source before aggregation. You can right-click a new prompted filter and point to Aggregation to select a different aggregation operation, or select Detail to apply the filter to each row before aggregation. For more information, see Summarizing Numeric Data Using Filters.
If you right-click a new numeric filter and select Greater than or equal or Greater than, you can select a minimum value for the filter range. The upper limit on the slider is fixed and cannot be moved. Selecting Greater than or equal includes the value indicated by the slider in the filter, while selecting Greater than excludes this value. Similarly, if you right-click a numeric filter and select Less than or equal or Less than, you can select a maximum value to display. The lower limit on the slider is fixed and cannot be moved. Selecting Less than or equal includes the value indicated by the slider in the filter, while selecting Less than excludes this value. The slider displays the greater than (>), less than (<), greater than or equal to (≥), and less than or equal to (≤) symbols to differentiate your choices.
Note: Selecting the full range of values in the slider includes all values in the filter. The value indicated by the slider head is not excluded in this case, even if the Greater than or Less than filter options are used.
If you add a date field, you can use the date picker window to select a start or end date, range of dates, and more, as shown in the following image.
You can use a default range available in the list on the left, or select your own range of dates from the calendar. Click the same date twice to select a single day.
If you right-click a new date filter and select After or Before, you are unable to select a range using either the preset or custom range options. Instead, use the calendar to select a start or end date for the filter.
Similar to filtering a numeric field, you can right-click a date filter control and click On or after or On or before, as an alternative to After or Before, to include the start or end date selected in the calendar. The After and Before options do not include the selected date in the date range of the filter.
In addition to the options specific to each type of filter, you can make the filter required. When a filter is required, filtered content will not load until the user makes a selection for that filter. To make a prompted filter for new content required, right-click the filter and click Require selection. To make a prompted filter for existing content required, select the filter control and, on the Settings tab of the Properties panel, clear the Optional check box. When this content item runs, the autoprompt window displays, prompting you to choose a value from the drop-down list, as shown in the following image. You can also use the Search field to locate a value.
You can right-click a filter control for existing content on a page to access formatting options. For example, you can convert a list control to radio buttons, check boxes, or a button pane, merge two related controls, and access configuration and format options on the Properties panel. For more information, see Styling Filter Controls in a Visualization.
You can visually create prompted filters by selecting areas of a chart directly from the canvas as you create it, as well as at run-time. This is called on-chart filtering. Since on-chart filtering is performed based on visual selections on a chart, they are quick and intuitive to create. On-chart filters created from one item immediately affect all other content created on the page, allowing you to see the impact of your filter immediately. On-chart filtering is available from pages containing one or more new content items, and from stand-alone charts created using the AHTML output format.
On-chart filtering is enabled in applicable content types by default. To disable on-chart filtering, open the Filter options menu and deselect Use content as filters.
To use on-chart filtering, select one or more areas of a chart by clicking a single section or by clicking and dragging, or lassoing, an area of the chart. The selected sections of the chart are highlighted, and a tooltip appears with information about the selected area, as shown in the following image.
From the tooltip, you can filter the entire visualization for the data that you selected in the chart. Click Keep to create a prompted filter for the selected values, or click Exclude to create a filter that excludes the selected values.
You can create several filters using on-chart filtering to further refine the data that you display in the visualization. Each of these filters affects every item on the page. When a filter is created, it is added to the Filter toolbar. If the filter applies to a single dimension, you can click the filter label in the toolbar to edit it. If the filter is applied to multiple dimensions, such as a bar chart with one dimension in the Horizontal bucket and another dimension in the Color bucket, then the filter is not editable from the Filter toolbar. However, you can point to it to see a tooltip listing the filter selections, as shown in the following image.
You can right-click the filter label at design time to delete the on-chart filter or swap between keeping and excluding the selected values. You can also delete a filter created with on chart filtering by selecting an area of the chart and clicking Remove Filter on the tooltip, or by clicking the X on the filter control in the Filter toolbar. The visualization restores the values previously hidden by the on-chart filter.
On-chart filtering works similarly at run time. When you run a page created with new content, you can click or lasso different areas of a chart to dynamically filter the entire page.
When a content item or page includes multiple filters, chaining ensures that those filters always return valid values to your content. When you select a value from one of the filter controls, the other controls can be filter and updated based on the value that you select, if chaining is applied. For example if you have a filter for Sale Quarter chained to a filter for Sale Month, then when you select Q1 from the Sale Quarter filter, the Sale Month filter updates to show only the months of January, February, and March, and automatically excludes any month values that were not in Q1.
Two different chaining behaviors are available: multidirectional and hierarchical. When multiple prompted filters for alphanumeric dimension fields are created in a visualization created with new content, they are chained multidirectionally, by default. This means that the selection from one prompted filter control automatically filters and updates the available values in all other controls for alphanumeric fields, so they only display relevant values. This ensures that users cannot select filter values that result in no data displayed in the visualization, regardless of the order and arrangement of the filter controls. To select a value that has been hidden because of chaining, clear any other filters that may have resulted in the value being unavailable. Note that on-chart filtering also affects the available filter values when multidirectional chaining is enabled.
For example, the following image shows a chart with multidirectional filter chaining enabled. Notice that, since the filter for Sale Day was set to 31, only months with 31 days are shown in the drop-down list for Sale Month.
If you make selections in one filter control, and then make selections in another chained filter control that make some of the original values unavailable, those originally selected values are restored when the other filters are cleared. For example, if you set the Sale Month filter to September and December, and then set the Sale Day to 31, September is no longer visible in the Sale Month control, since it only has 30 days. Only December is selected. When you clear the Sale Day control, both September and December are selected once again in the Sale Month control.
Full multidirectional chaining is only applied to list controls. Calendar and slider controls are not chained. While slider controls and preset ranges in calendar controls update to reflect the current range of data, similar to chaining, the values selected using a slider or calendar do not affect the other controls.
You can change
the chaining setting for filters in the page to hierarchical chaining or no
chaining by clicking the
Filter options menu
and
selecting
Link hierarchies or
Do
not link filters, respectively. The option to change chaining
behavior is only applicable to stand-alone content or content created within a
visualization.
Hierarchical chaining is based on drill levels in your metadata. When you select a filter value, chaining is applied to fields that are lower in the same filter hierarchy. Filter controls for fields that are higher in the same hierarchy are not affected by filter selections when using hierarchical chaining, nor are filter controls for fields that are not in the same hierarchy.
Hierarchical chaining is the default behavior for filter controls that are added to a page from external content. When external content is added to a visualization, hierarchical chaining is applied automatically to any content with WHERE filters using a WITHIN phrase. WebFOCUS Designer automatically adds the WITHIN phrase to filters from the same metadata hierarchy, so hierarchical chaining is enabled for content items created in WebFOCUS Designer by default when they are added to a page as external content.
When assembling a page from existing content, you can manually apply hierarchical chaining relationships to filter controls from the Filters tab on the sidebar, even if those fields are not part of the same metadata hierarchy. The Filters tab shows a list of all parameters in your assembled page. The order of this list does not impact filtering behavior, but the parameter list does indicate chaining hierarchies, which display as values indented below their parent value. Drag a parameter in the list on the Filters tab onto another parameter to make it a child of that filter control. You can create a multi-level chaining hierarchy so that selections from one filter apply chaining to a second filter, and selections from the second filter apply chaining to a third filter. The following image shows the parameter list with a selection of filters that have been added to a page assembled from existing content.
In this example, the filter selections in the Customer Business Region filter are chained to the Customer Country and Customer State Province fields, so if you select North America as the business region, then only countries and provinces in North America will be available from the other respective filter controls. Since hierarchical chaining is unidirectional, if you select a country for the Customer Country filter, the Customer Business Region is not affected, so you could still select a business region other than the one that contains the previously selected country.
Filters from multiple data sources used for content in an assembled page can be chained together, although if the field name and values of parent filters do not exist in the data source used for the child filter, chaining will not work properly. To unchain a parameter, drag it into the empty space between the Add all filters to page button and the top parameter in the list. The parameter is removed from the chaining hierarchy and moved to the bottom of the list.
How to: |
Importing a filter from external content in WebFOCUS Designer is a quick and intuitive process. Additionally, parameter filters added to a page from existing content can be rearranged and styled with options unavailable to filters created for new content in a page.
Whenever you add a parameterized content item to the canvas, such as a chart or report that uses a prompted filter or dynamic parameter, the parameters are recognized and you can create filters for them automatically. A badge count is overlaid on the Filters tab on the sidebar, as shown in the following image.
The Filters tab provides options to add filters to your page and apply chaining to them. Open the Filters tab and then click Add all filters to page to create filters for all identified parameters. Alternatively, right-click a parameter in the list to create a single filter control. Each filter in the list on the Filters tab displays the filter name and, under Bindings, the data source and target items associated with the filter. Available filter values are pulled from the data source, and the selected values are passed to the target items. Chaining is indicated by tabbed hierarchies on the Filters tab, and can be applied manually by dragging one filter onto another in the list. To unchain a single filter from a hierarchy, right-click a child filter and click Unchain filter from parent. To unchain all filters in a hierarchy, right-click the parent filter and click Unchain all child filters.
The ellipses menu in the upper-right corner of the Filters tab of the sidebar provides access to the following options:
Note: When this setting is disabled, the unused filters are hidden and their count is displayed below the filter tree.
Note: To learn more about page defaults, see Customizing Assembled Page Defaults.
After you add filters from external content to a page, you can right-click a filter control to access formatting options. For example, you can convert a list control to radio buttons, check boxes, or a button pane, merge two related controls, and access configuration and format options on the Properties panel.
If a filter is configured to exclude selected values, the not equal icon is added to its label to indicate that all your selections will be excluded.
As an alternative to using the Filter toolbar, or in addition to it, you can add a grid container to a page either by dragging it from the Resources panel when you select the Container tab on the sidebar, or simply by dragging a filter onto the canvas where a grid container will be automatically created to accommodate it. A grid container includes multiple cells into which filter controls can be placed. You can also move the original filter toolbar or have it display in a modal window by selecting the entire page and then clicking one of the filter location options on the Settings tab of the Properties panel.
You can interact with the filter controls in an assembled page at design time to see how different filter selections affect your content. However, these filter selections are not retained at runtime. To change the default value for a filter in an assembled page, select the filter and, on the Settings tab, in the Data Settings section, type a value into the Default value text box.
You can also change the values that are available from the filter control. As an alternative to the values that are automatically brought in from the field that the filter is associated with, you can manually add values to the control as a static list, or import all values from an external data source as a dynamic list. Once you add controls to the page, select a control and, on the Settings tab of the Properties panel, in the Bindings section, click the pencil icon next to the Source box. The Edit Source dialog box opens.
In the Edit Source dialog box, leave Default selected to automatically pull all relevant values from the data source. Select Static and then click Add Row to add a new value. You can type the literal value that is passed to the filtered content in the Value column, and the text that displays in the filter control to represent that value in the Display column. You can add multiple items, reorder them, and delete them as needed. The static list options in the Edit Source dialog box are shown in the following image.
If you select Dynamic, you are presented with the choice of two options: From Data and From Procedure. If you select the From Data option, you can choose a synonym available in your environment, and then select the fields from that synonym that should provide the actual and display values for the filter. Optionally, you can enable sorting for your filter either by the actual or display value as well as configure the sorting order. The options to populate a filter with values from fields in a data source are shown in the following image.
If you select the From Procedure option, you can bind your filter to an existing content item in your repository. Keep in mind that this item must be converted to an XML format in Text Editor, as shown in the highlighted section of the following image.
Select your previously created and modified item in the Procedure field, then select fields from this item that should provide the actual and display values for the filter. The sorting options are disabled here to preserve the sort order defined by the selected procedure. An example of the options to populate a filter with values from fields in a procedure is shown in the following image.
Note: You can leave the Display from field empty, if the display value is the same as the actual value. If left empty, the Display from field automatically reflects the Value from field setting.
To see which filters apply to which external content items, in addition to the binding information on the Filters tab, click Info on the Visualization toolbar. Each content item on the page lists the parameters by which it is filtered. The chart displayed in the following image is affected by filters for six fields, listed under Parameters/Filters. The not equal icon indicates the filter that is configured to exclude the selected values.
When you bring existing, parameterized content into a page, you are prompted to create filter controls for each parameter. Once created, these controls can be modified with a set of additional options that are not available when creating new content items.
WebFOCUS Designer opens in a new browser tab.
A badge appears on the Filters tab icon on the sidebar, indicating that there are unbound filters.
Note: The quickest way to create stand-alone content featuring the same set of parameters is to start by creating a Reporting Object with desired parameters, and then using the Reporting Object to create content. To do so, on the WebFOCUS Hub, click the plus menu and click Create Visualizations, or on the WebFOCUS Home Page, click Visualize Data. When WebFOCUS Designer opens, select a Reporting Object as your data source.
Additionally, you can multi-select filters in the Filters tab by holding the Ctrl or Shift key, right-clicking them, and then clicking Add to page. You can also drag them onto the canvas to create a grid container.
Once the filters are added, the filter bar appears above your content with the controls that you chose to create.
To right-click a cell, right-click the margin above or to the left of a filter control.
Note: Another way to edit a control label is to double-click the filter label, type the new text, and press the Enter key.
You can convert a list control, created for alphanumeric fields, to radio buttons if single-select, check boxes if multiselect, or a button panel. You can convert a single-headed slider, created for single-select numeric fields, to an input box.
Note: To learn more about page defaults, see Customizing Assembled Page Defaults.
Note: To learn more about interactions, see Working With Interactions.
The Combine option only applies to single-select date and numeric slider controls. They can be combined into a single control with a start and end point.
By default, the filter controls that you create in WebFOCUS Designer include, or are bounded based on, a list of values from your data source, which allows you to more easily select valid values from these controls. However, when working with large or streaming data sources, it may not be prudent to query the data source to retrieve this list, as a large number of values may exceed the maximum that can display in the filter control, or cause performance issues, while values from streaming data sources may change rapidly.
As an alternative, when creating a single chart or report, or a page with new content, you can provide dataless filters for specified segments in a data source, in order to conserve the resources needed to perform data retrieval. This filtering behavior is also applied at run time in pages created with new content. Filtering behavior in autoprompt and in pages assembled from existing content is not affected.
Once dataless filter controls are enabled for a segment in a data source, when you create a filter using a field from that segment, a predefined list or range of values is no longer provided in the filter control. For alphanumeric and numeric fields, the filter control is an edit box into which you can type your own values. In the case of alphanumeric fields, you can type multiple values, while for numeric fields, you type the start and end point for a range of values. For date fields, the filter is a calendar control in which only the previous week is selected by default. You should therefore be familiar enough with the data source to provide valid filter values.
The dataless edit box filter control used for alphanumeric fields is shown in the following image.
The dataless edit box filter control used set a range of values for a numeric field is shown in the following image.
The dataless calendar control is shown in the following image. Notice that the same preset date options and calendar selection options are available as when data retrieval is performed. Only the default custom date range is affected.
Dataless filter controls are activated for a segment in a data source by adding a property to the Access File of the synonym. Add the setting DATASIZE=INFINITE to turn on dataless filtering for a segment. This segment can represent an entire data source or a single table within a larger data structure, meaning that you can turn on dataless filtering for fields in individual segments that you want to filter without retrieving data values. Set the DATASIZE property to INFINITE in the Access File, as shown in the following syntax example.
SEGNAME=segment, DATASIZE=INFINITE, TABLENAME=table, $
where:
Is the name of a segment whose fields you want to filter without data retrieval. The segment must be defined in the Master File with which the Access File is associated in the synonym. This allows you to configure dataless filtering for a selected set of fields.
Is the name of the original data source that the synonym whose Access File you are editing represents. This may be a flat file, a table in a database, or another collection of data records.
For more information about setting properties for metadata, see the Describing Data With WebFOCUS Language technical content.
Once enabled, filters created for fields from the specified segment are set by manually supplying filter values. Prompted filters for alphanumeric fields can be applied by typing the filter values into a text box. You can enter multiple values, and deselect previously entered values that you no longer want to use by clearing the check boxes in the list of values. Filter values that are deselected at design time do not appear at run time. You can determine whether selected filter values should be applied or excluded by right-clicking the control and selecting Include or Exclude.
Prompted filters for numeric fields also allow you to type in filter values. By default, numeric filters are applied as a range, bounded by a maximum and minimum. Therefore, two edit boxes are provided into which you can type a minimum and maximum value. If you change the filter to use an open-ended range that is greater than or less than a specified value, only a single edit box is provided in the filter control.
Prompted filters for date fields allow you to select a preset date range relative to the current date, or set a custom date range. The custom date range defaults to the past week, but can be set to any range of dates. By default, you set date filters to using a range with a fixed start and end point, but you can change it to an open-ended range that begins or ends on the selected date, by right-clicking the filter control and selecting a new filter relationship.
Static filters include a similar set of options when creating filters without referencing the data source. For all field types, the Select from data option is unavailable. For alphanumeric fields, this leaves the Select from file, Enter manually, and Wild card options, which allow the user to provide their own values. For date fields, this leaves the Select ranges, Select from file, and Enter manually options. The default date range for the Select ranges option is initially set to the current date, but you can set the start and end of the date range to any date, as needed. For numeric fields, this leaves the Select ranges, Select from file, and Enter manually options. When providing a range of values, the slider is removed, and you can provide start and end points for the range by typing a value into an edit box. The ability to create a filter by comparing two fields is unaffected.
When you create a filter for a measure field in new content, you can choose to filter by aggregated values, using a Summary filter, or by individual records, using a Detail filter. This enables you to review data from a high level or based on a more granular view.
To specify one of these options in a new prompted filter, when you place a measure on the Filter toolbar, right-click it and point to Filter on to access the Detail and aggregated filter options, which are shown in the following image.
To choose between detail and aggregated filter options when creating a static filter, drag a measure to the Filter bucket and select an option from the Apply aggregation drop-down menu.
Summary filters are indicated by an aggregation prefix operator on the filter control label.
The Summary option, which is the default for measure fields, allows you to select records based on the summed, aggregated value of a field. All values for the chart, report, or page are calculated, and then the aggregated values are filtered based on whether they meet the filter requirements. For example, if you create a chart that shows Revenue sorted into Product Categories, you can use a summary filter to display only the Product Categories that meet the selected filter requirements.
If you create a new summary filter in a visualization with multiple content items, the minimum and maximum values available in the filter control are the minimum and maximum values across all combined sort fields in the entire visualization. For example, if you created a chart that was sorted by Product Category, and then added a second chart that was sorted by Sale Year and colored by Sale Quarter, then the values in the summary filter would reflect the range of values for each product category and each combined sale year and sale quarter. In the following image, the minimum available value for the summary filter on the Revenue field is 11,047,133, which is the revenue from Q1 2014 in the bar chart on the right. This is the smallest value on the page. The maximum available value, 291,294,934, is the revenue for stereo systems in the pie chart on the left. This is the largest value on the page.
All of the other values in the pie chart and the bar chart on the page fall between these two points. As a result, certain summary filter selections may exclude all values from one chart, but not another.
You can also filter using Detail values, which represent each record of your data source. In this case, filtering occurs before the values are calculated for each sort value. If you create a chart that shows Quantity Sold sorted by Product Category and add a Detail filter, the individual record values from the data source are filtered based on whether they meet the filter requirements, and then sorted into product categories and aggregated to display the quantity sold for each.
Consider the following two charts, each of which uses a filter for Revenue greater than $10,000. The first chart uses a Summary filter, so it is filtered after aggregation. It displays Revenue values for every product category that had over $10,000 in total revenue. Each of the seven product categories met this criterion, and are therefore displayed in the chart, as shown in the following image.
In the second chart, the Summary filter has been changed to a Detail filter where Revenue is greater than $10,000. This filter is applied before data aggregation. Since each record in the data source represents a single sale, the data is filtered for individual sales that earned revenue of over $10,000. Those values are then grouped by Product Category into the chart shown in the following image.
In this case, the only individual sales for more than $10,000 were for camcorders and televisions.
In addition, when working with numeric filters, you can select the type of aggregation to be used in a Summary filter. By default, a Summary filter, created using the Summary option, uses the sum aggregation. You can also apply standard aggregation methods including average, count, count distinct, minimum, and maximum to a Summary filter. Selecting one of these options filters your content for aggregated values matching the specified criteria, indicated by the label on the filter control, as shown in the following image of a filter control using the average aggregation method.
If you create a filter for a field in your chart or report that already uses a prefix operator aggregation, by dragging the field from a bucket to the filter toolbar or by right-clicking it in a bucket and clicking Add to filter toolbar, a Summary filter is created with the prefix operator aggregation applied.
If the field with the prefix operator is a dimension field, which can use the count, count distinct, or percent of count prefix operator aggregations, then you can create two filters for the field, one for the non-aggregated dimension field and one for the aggregated version of the field.
If your request produces a single aggregated value before applying a Summary filter, such as when there are no sort values, the filter control shows a single Summary value instead of providing a range. If you point to the filter value on the Filter toolbar, a tooltip appears that says, Summary filter irrelevant. Change to Filter on Detail or add a sort field to your request.
If you create a Summary filter and then changes are made to the request such that the minimum or maximum value on the Summary filter range falls outside the range of values in your data, then that filter value appears in red in the control. If you point to it, a tooltip indicates that it is outside the range of your data. The filter is still valid, but may not be applicable to the current state of your content. Similarly, when creating a static filter, you can type a value that is outside the range of values in your data. In this case, the text box displaying the value is outlined in purple and a message indicates that the value is out of range.
If you create a numeric range in a static filter where the minimum value is greater than the maximum value, the filter is not valid, and you cannot save it. A warning appears alerting you that the start and end points are invalid.
How to: |
By default, when you create a prompted filter in WebFOCUS Designer, the filter is optional. You can right-click a new prompted filter and select Require selection, or select a prompted filter for existing content and clear the Optional check box on the Settings tab to make it required. This means that users must select a value at run-time before affected content on the page loads. Required controls from external content are marked in red, prompting you to make a selection for the request to be processed. The image below shows an example of a required filter control.
Be sure to select the filter control itself. If you click just outside the filter control, you will select the cell containing the control, which can also be styled and formatted.
The filter control is marked in red and the Make a selection text displays inside the control field.
Your content opens in a new browser tab or window. The content affected by the filter does not initially load. You must select a filter value first.
The content refreshes to reflect your selection.
In this section: |
In WebFOCUS Designer, list controls are created for alphanumeric fields and numeric dimension fields. There are two types of list controls in WebFOCUS Designer:
An example of a single select list control is shown in the following image.
Once you have made a selection in a single select list, your content instantly refreshes to reflect that selection.
An example of a multiple select list control is shown in the following image.
Once you have made all your selections in the multiple select list, you must click outside of the control for the content to refresh.
If the prompted filter was created in a visualization with new content, you can switch between a single and multiple list control by right-clicking the control and selecting Single or Multiple. If the prompted filter was created for external content, the parameter on which it is based is already defined as single- or multiselect.
List controls for new content include a search feature to make it easy to select the filter values you want to use. To add or remove the search box for a filter for external content in an assembled page, select or clear the Search check box on the Settings tab of the Properties panel. Once search is enabled in the control, simply start typing any word or syllable and all values that contain it will display.
If a list contains 200 or more values, the paging feature is added to the bottom of the control. When paging is active, 10 values display per page. An example of a long list with the paging feature enabled is shown in the following image.
List controls for new content also include the Select all and Clear buttons. These are especially useful when you need to eliminate just a few values from your results. You can click Select All, clear the values that you need to eliminate, and click outside of the control to refresh your content. These can also be added to multiselect list controls for existing content by selecting the Selection controls option on the Settings tab.
Once you've typed a search term, you can use the Select all button to select all search results, as shown in the following image.
Note that the Select All option selects all values in the control. If the control does not contain all field values, then those values won't be included in the filter. Additionally, the filter selection will not update to include new values added to the data source. To ensure that all values for the selected field are included in the filter, clear the filter selection. All displays on the filter control, indicating that all values are used in the filter.
Dropdown list controls in pages assembled from existing content can be converted into different types of controls that offer similar functionality. You can convert a multiselect list to a checkbox control, double list control, or a button set, and you can convert a single-select list to a radio button control, toggle control, or a button set.
Note: In charts, reports, and visualizations with new content, drop-down list controls and slider controls using the Detail option have a record limit of 5000 values. Values beyond this limit are not available for selection in the filter control. There is no record limit for filters in visualizations assembled from existing content, calendar controls, or slider controls using a summary aggregation.
Another common type of control for alphanumeric fields is a double list control. You can select items in the full list of values on the left, and add them to the list of selected values on the right. The double list control also includes the option to reorder the selected values. This can be especially useful when using multi-select field list parameters in an InfoApp, allowing you to change the order of sort and measure fields in the parameterized content. The only other type of control that includes this reordering behavior is the check box control when you select the Allow reordering option. The double list control is available only for alphanumeric, multi-select parameter filters.
Double list controls can be added to pages assembled from existing content. To add a double list control to your page, add an external chart or report that is filtered by an alphanumeric, multi-select parameter, and add the default drop-down list control to the Filter toolbar or a grid container. Right-click the control, click Convert, and then select Double List. A text box that displays the default filter value or values appears in the filter grid. Click the text box to open the double list control, as shown in the following image.
To apply
filter values, first select the values in the list on the left that you want to
use by selecting the check box for each one. Selected values in the list are
shown as checked. Select the check box for a selected value again to deselect
it. You can select multiple consecutive values by holding the Shift key and
clicking the check box for two values. You can select all available values by
clicking the check box in the list header, and deselect all values by clicking
it again. When more than 50 values are present in the list, it is divided into
multiple pages of 25 values each. To navigate to a specific value, filter the
list by typing a text string into the search bar. When you have selected the
values that you want to use in the filter, click the right arrow button
to
move them to the list of applied filter values on the right. You can also
double-click a single value to move it from one list to the other. Click
outside of the double list control to apply the filter selection.
You can
reorder the applied values by using the up and down arrow buttons
in the
control, or by dragging an item up or down within the list on the right. When
the double list filter control is used in a multi-select field list parameter,
this allows you to change the order in which user selected fields appear in
dynamic content. For example, you can use the double list control with a
multi-select field list parameter to swap the primary and secondary sort fields
in a report, placing focus on different values. To create a multi-select field
list parameter, click
Add Parameter Field List in the Filters area of the
Settings tab, and then, in the Add Parameter Field List dialog box, set the
Control type to
Single select. For more information, see
Enabling Field Selection at Run Time With Field List Parameters.
To remove one
of the applied filter values, open the double list control and double-click a
value in the list on the right, or select the values in the list on the right
and click the left arrow button
. You
can also click
Clear List to immediately remove all applied filter
values.
How to: |
In some cases, instead of having a list of several possible filter values, you may want to create a filter in which only two values are available. Sometimes, this will be a Boolean expression, in which a pre-defined flag can be set to true or false. At other times, you may have a field that has only two available values, and you may want only one or the other to be available at a given time. In each of these cases, a toggle control can be a straightforward way to present these filters. The toggle control is available in pages assembled from existing content items. A toggle control is shown in the following image.
To create a toggle control, either drag it directly from the Control tab on the sidebar and populate it with a parameter [by however you will be able to do this], or add a parameterized chart or report to an assembled page, generate filter controls for it, and convert one of those controls from a drop-down list to a toggle control by right-clicking the control and clicking Convert. The first two highest-sorted, unique values in the filtered field are added to the toggle control automatically. Only filter controls for alphanumeric fields can be converted into toggle controls.
Toggle controls are most useful for single-select parameters with only two available values, such as filters for flag columns that indicate whether a condition is true or false. However, toggle controls can be created for fields with more than two values, as well. In this case, the first two unique values in the data source are used, by default. If only one unique value is present in the field, then that value and an All value are available for selection using the toggle control, by default. If there are no available values in the selected field, then an All value is used for both sides of the toggle control. The first value in the toggle control is selected when the page loads. At run-time, click the toggle slider to select the second value, and click it again to switch back to the first value.
You can set the two values that are available from the toggle control by selecting it and then using the options in the Control Settings area of the Settings tab. You can set whether the toggle control displays one or two values, and you can set the display and actual values available in the toggle control. The Data Settings area when a toggle control is selected is shown in the following image.
The display value is the value that appears in the control itself, while the actual value is the value that is actually applied when a filter value is selected. To change the display values, change the text in the Label One and Label Two fields. To change the actual values, change the text in the Value One and Value Two fields. If you change the actual values, make sure that they match the values in the filtered data source exactly. Otherwise, the filtered content may not return any values when the filter is applied.
To display only the first value, which reduces the amount of horizontal space needed by the toggle control, clear the Display label two check box. In this case, when the toggle slider is switched off of the first value, the non-displayed second value is selected. Therefore, it may be best to show the label for the second value, unless the two available values are commonly juxtaposed opposites, so users can be expected to understand what the second value should be. A toggle control with only the first value displayed is shown in the following image.
You can style a toggle control using cascading style sheet properties. For example, you can use the background-color CSS property to change the color of all toggle sliders on a page based on the selected value. To set the color of the toggle sliders when the first value is selected, use the CSS selector .ibx-switch-slider.round, and to set the color of the toggle sliders when the second value is selected, use the CSS selector .ibx-switch.checked .ibx-switch-slider.round. For example, to set the slider color to green when the first value is selected and red when the second value is selected, you can add the following code to the CSS text editor for a page in WebFOCUS Designer, which you can access from the Outline.
.ibx-switch-slider.round { background-color: #77cc77; } .ibx-switch.checked .ibx-switch-slider.round { background-color: #ff2323; }
When the page is run and the first value is selected, the toggle slider displays a green background, as shown in the following image.
When the second value is selected, the toggle slider displays a red background, as shown in the following image.
In pages assembled from existing content, you can use the toggle control to quickly switch between two filter values. These are especially useful for dimension fields with Boolean values, or that have two available values that represent all of your data.
WebFOCUS Designer opens and prompts you select a page template.
The WebFOCUS Designer canvas opens.
A count of available filter controls appears on the Filters tab on the sidebar.
The default filter control, a drop-down menu for dimension fields, appears for the selected alphanumeric filters.
The Convert Control To dialog box opens.
How to: |
A slider control is a horizontal track with a marker or markers that you can slide between a minimum and maximum value. This versatile control is often used to choose a numeric value within a fixed range. An example of a slider control is shown in following image.
WebFOCUS Designer opens in a new browser tab.
Once you select a data source, WebFOCUS Designer loads with options to create a single content item.
If there are no dimension values in the chart by which to aggregate the numeric values on the slider, a tooltip indicates that slider selections are not relevant.
A slider control appears, allowing you to select default values for the filter parameter, as shown in the following image.
When a parameter using one of these options is added to a page in WebFOCUS Designer, the control is a slider with a fixed start or end point.
The Open dialog box opens.
InfoAssist opens.
To learn more about creating content in InfoAssist, see the WebFOCUS InfoAssist User's Manual.
The Create a filleting condition dialog box opens.
In this example we create the minimum and maximum parameters for the MPG field in the car report. An example of the completed filtering condition is shown in the following image.
The Text Editor window opens.
An example of the modified syntax is shown in the following image.
WebFOCUS Designer opens in a new tab.
A badge appears on the Filters tab of the sidebar, indicating that filters are available to add to the page.
The slider controls display in the filter grid, as shown in the following image.
Your controls are combined. You can double-click the label to edit it to reflect your new combined control. An example of the combined slider control is shown in the following image.
In this section: |
Parameters that contain dates are recognized by WebFOCUS Designer as date controls. You can filter date fields by setting start and end points to create a date range. When setting a date range, you can choose from a number of relative date ranges, or set a fixed custom date range using a calendar control. Click the same date twice to set the date range to a single day. The calendar control and relative date range options are shown in the following image.
Once you have set the date range, click OK to apply the filter, or click Reset filter to clear the filter and include all available dates in your content. Click Cancel to close the date control without making any changes to your filters.
Date ranges set in WebFOCUS Designer are actually based on two parameters, one for the start date and one for the end date. As a result, when you add content created in WebFOCUS Designer with a prompted date filter to an assembled page, each of the controls is associated with a distinct parameter. One parameter uses the Greater Than WHERE condition and the other parameter uses the Less Than WHERE condition. If you add each date filter parameter to the page separately, the start and end date each use separate filter controls. If you add all filters to the page at once, they are combined automatically. An example of separate start and end date controls for external content on the page is shown in the following image.
When assembling a page from existing content and adding the date filters separately, you can still manually combine the two date controls into a single date range control. To do so, multi-select two date controls, right-click one of them, and then click Combine. An example of a combined date range control is shown in the following image.
When creating new content with a date filter, the date control is automatically a combined control that allows you to select a date range.
The calendar feature inside a date control allows you to select a specific date value. Once you pick a specific date, it is always spelled out, so that it can be supported by all internationalized applications.
In addition to custom date ranges, you can make use of the presets. Simply select This or Last, and choose the appropriate period from the drop-down list. Your range can include such periods as day, week, month, quarter, and year. When selecting This, you can select the Include entire period checkbox to view the data for all days in the period. When selecting Last, you must choose both duration and period to create a valid date range. Select the Include up to current checkbox to view the data for all dates leading to the current date in the selected period. An example of the date range for the last two weeks, up to the current date, is shown in the following image.
Fields that include both the date and a timestamp, as opposed to just the date, are considered to have a date-time format. Date-time fields are considered a separate field type from regular date fields. You can filter a date-time field to the millisecond, depending on the precision of the field format used for the field, allowing granular start and end points for date-time ranges.
When you create a prompted or static filter for a date-time field in a chart, report, or page in WebFOCUS Designer, you are presented with the ability to set a time range and change the time zone in addition to the regular date filtering options. When you select ranges for a static filter or use the Custom range option for a prompted filter, you can set a time range to provide more granular start and end points for the selected date range when using a date-time field. The start time is applied to the start date, and the end time is applied to the end date. You can set start and end times precisely to the millisecond level, or choose not to set a time range by clearing the Apply time range check box. To set a time range using the filter control for a date-time field, when creating new content or running an assembled page, open the control and click Custom. Spinners to set the hour, minute, second, millisecond, and half of the day using a 12-hour system appear below the calendar, as shown in the following image, and you can also type numeric values into them.
The available time components depend on the format of the date-time field being filtered. The following image shows the date-time filter control for a field with a format of HYYMDI, which is precise to the minute level. As a result, only hour and minute time components are available to set.
Once you have set the start and end date and time for your filter, click OK on the filter menu to apply it. To reset the filter to include all available values, open the filter menu, click Reset filter, and then click OK.
In some cases, however, the time values in your data may have been recorded in a different time zone than the one in which you are currently located. You can change the time zone that is applied to the filter to adjust the filtered data based on the time difference between your location and the location from which the data was recorded. When you set a time zone as part of a date-time filter, content is filtered to show data, which may have been recorded in a different time zone, based on whether it would fall within the defined time and date range in your current time zone.
For example, if the data was recorded in Greenwich Mean Time, which is UTC±0 during standard time, and you set the time zone for your date range to a location that uses Eastern Standard Time, which is UTC-5, then the filter that would start at 12:00 AM if the time zone were not changed instead begins at 5:00 AM when the time zone is set. This is because 5:00 AM in UTC±0, which is used as the time zone where your data originated, is the same time as 12:00 AM in Eastern Standard Time, the time zone that you selected for the filter. The start time for the filtered date range is shifted based on the difference between the two time zones. The data values displayed in your content do not change when you change the time zone used in your filter, and are assumed to have been written from a time zone with an offset of UTC±0.
To apply a time zone to a filter, drag a date-time field into the Filter toolbar or Filters bucket. In addition to the range options that are also available for date fields, a Time Zone option appears, with the default time zone selected, if one has been set on the Reporting Server. To set the time zone for a prompted filter, click the Time Zone menu, as shown in the following image.
To set the time zone for a static filter, click the Time Zone option, as shown in the following image.
If no default time zone has been set, select the Apply a time zone check box to enable time zone selection. You can select time zones for locations sorted by country or territory, on the Time zones tab, or based on the UTC offset, on the Time Offsets (UTC) tab.
To select a time zone based on a location, on the Time zones tab of the Time Zone dialog box, first select a country or territory from the Country drop-down list. You can start typing the name of a country or territory to navigate to it more quickly. Once you select a country or territory, a list of available location-based time zones in that country appears, as shown in the following image.
Select a location and then click OK on the filter menu to apply it.
Time zones based on locations automatically apply daylight savings, depending on the time of year. For example, the North American Eastern Time zone has a UTC offset of UTC-5 during standard time, and a UTC offset of UTC-4 during daylight time.
When applying a time zone to a date range filter for a date-time field, your data is interpreted as having been written from a time zone with an offset of UTC±0. This is the offset during standard time for the Western European Time time zone, during daylight savings time for the Azores and part of Greenland, and year-round for Iceland and most of West Africa. Therefore, if your data comes from a different original time zone, it is recommended to use a UTC offset equivalent to the time difference between the time zone where the data originated and your current time zone. For example, if your data originated in Los Angeles, and you are currently located in New York, then you can select an offset of UTC+3 to see content with date-time data from Los Angeles, filtered based on a start time of midnight in the New York since the time zone for New York is three hours ahead of the time zone for Los Angeles.
To select a UTC offset instead of a location-based time zone, click the Time Offsets (UTC) tab and select an option. Click OK on the filter menu to apply the new time zone.
Once you set your time zone, select a date range for your filter and apply it. Your content refreshes, and the hour at which your date range starts and ends is adjusted based on the selected time zone.
If you create a page with multiple date-time parameter filters, the same time zone is applied to all of them. When you select a time zone for one filter, an alert appears to inform you that it will also be applied to other date-time filter controls on the page.
If you set a time zone and then want to revert to the default, open the Time Zone dialog box and click Reset filter, then set the start and end date and time again. If you decide you do not want to apply time zone adjustments at all, open the Time Zone dialog box, clear the Apply a time zone check box, and then click OK.
You can set the default time zone in the locale settings of your reporting server. On the WebFOCUS Hub, click Management Center and select Server Workspaces. Alternatively, In the Server Console, click the Tools menu and click Workspace. Click the Settings menu, point to LOCALE, and then click LOCALE (Language, Numbers, Currency, Dates). Type the default time zone name into the TIMEZONE field. The time zone should use the IANA tz database name, which typically uses a format similar to Region/City_Name. For more information, see the List of tz database time zones on Wikipedia.
When creating a page from external content, you can configure the properties of the filter toolbar, a filter grid panel, or single filter control by using the Properties panel, which is context-sensitive. For example, when you click a filter cell on the toolbar or in a filter grid, the cell style properties open in the Properties panel. When you click a filter control within a cell, the configuration and style properties for this control open in the Properties panel. You can access properties for the entire Filter toolbar or a filter grid by selecting it from the outline. When creating a page from new content, a smaller set of options are available for a filter control or for the filter toolbar.
The Properties panel consists of the Settings tab and the Format tab. The Settings tab includes options to configure the behavior of the Filter toolbar, a filter cell, or a filter control. The Settings tab on the Properties panel for a filter control created for external content is shown in the following image.
When you select the entire page, if it was assembled from existing content, you can change the position of the filter toolbar using the following options:
If Include Page Filters is selected, you can select one of the following options to change the position of the filter toolbar:
When the Filter toolbar or a filter cell is selected, the Settings tab includes two properties:
Filter controls created within a page have different configuration and styling options than filter controls added to the page from referenced, external content. When you select a filter control that you created directly within the page, the Settings tab contains the following properties:
When you select a filter control that was generated from external content using the Filters tab on the sidebar, the Settings tab contains the following additional property:
Note: The Placeholder text property is only used for required controls. The placeholder text appears before a selection has been made. To change the default text for an optional control, if the Default value for the control is _FOC_NULL, meaning all values, enable the Show All option property and type a value for the Display text property. The Display text option in the control represents the _FOC_NULL, or all values, filter value.
Note: If the select list contains 50 or more values the Search option is enabled automatically.
Note: The Selection controls and Show All options cannot be selected at the same time.
Note: By enabling paging, both the option 'Paging threshold' and 'Items per page' will be enabled by default.
Note: By default the threshold will be enabled and set to 50.
Note: By default the Items per page option will be enabled and set to 25.
Note: The list contains Saturday, Sunday and Monday. Every calender option will change according to the selection you make.
Note: Choosing this option results in the parameter receiving a _FOC_NULL value. If this parameter is used in a WHERE condition, it results in the WHERE condition being removed from the request and all data values for this field displaying the page.
Note: The Display text property is available when Show All option is selected. The display text option in the control represents all values. To supply a placeholder value for required controls that appears before a selection is made, use the Placeholder text property.
The following options are available for toggle controls only:
When creating a visualization using external content, the Format tab of the Properties panel provides layout and styling options for the Filter toolbar, a filter cell, or a filter control. These options differ depending on the origin of the filter and the item selected. Format options are not available for new prompted filters created in a visualization.
The Format tab of the Properties panel, for the filter bar on the Filter toolbar or in a grid container, is shown in the following image. You can use these options to change the layout of the cells in the Filter toolbar or grid container, and change the theme style it uses.
The Format properties for a bar are:
When you are using a columnar layout and the number of filters exceeds the number of columns, the extra filter controls are added to new rows in the Filter toolbar. In the carousel layout, you can use the arrows on either side of the Filter toolbar to scroll to additional filter controls.
The Format tab for a cell is shown in the following image.
When you configure these properties, you modify the alignment of a control or other object within a cell. Cell format properties are only available for cells in the columnar grid or toolbar layout used in a visualization with external content. The cell and filter control in the carousel style layout used in a visualization with new content are not separate components, so the cell cannot be selected for formatting.
The properties for a filter cell are:
The Format tab for a filter control created for external content is displayed in the following image. You can modify the positions of labels in a control, define the alignment, and set the object width.
The style properties for filter controls in a page with external content are:
Prompted filter controls created in a visualization with new content always use a predefined, simple filter style. No format options are available for these controls.
How to: |
When assembling a visualization from existing content, WebFOCUS Designer supports two event models for passing parameters to your page content:
You can delete the Submit button to use the on-selection change event model for your filters, but still retain the Reset button, and you can also delete the Reset button to keep only the Submit button on the page.
Your content opens in a new browser tab or window, allowing you to interact with content and filters. If your page content contains default values, page filters and page content run in parallel, which results in a faster loading time.
Each time you make a selection, the content refreshes to reflect it.
Note: Notice that, if you have parameters that come from the same field hierarchy in your data source, the filter controls are chained in such a way that each selection automatically reflects the available choices in other filters. In our example, we set Category to Televisions. Now, the Product Model filter only shows models of televisions, as shown in the following image. WebFOCUS Designer chains controls automatically, if the parameters are defined in the metadata layer with the WITHIN keyword to relate them.
The Submit and Reset buttons display in the filter grid.
Note: You can delete one or both buttons by right-clicking them and clicking Delete.
The content runs in a new browser tab or window, allowing you to interact with content and filters.
The content refreshes to reflect all your selections upon clicking the Submit button, as shown in the following image.
The filters return to their default values.
Note: If you deleted the Reset button, you must select default values manually, and then click Submit to return to the default state. Alternatively, you can click the refresh button on the page toolbar to refresh all content and filter controls on the page.
How to: |
The Global Name property is a powerful tool that allows you to quickly synchronize filter control values between different pages. The Global Name property is configured on the Settings tab of the Properties panel for a filter control in an assembled page. Once enabled, it allows you to match your filter selections across multiple pages at run time within the same browser session. This option is especially useful in a portal. The global name can be used to synchronize filter control selections across multiple pages in the same portal.
Note: You can choose any text as a global name for your control. Combined controls, such as date ranges and slider controls, have a single global name property.
Note: To streamline this process, you can use the Save As option to create a new version of the existing page, leave the configured filters intact, and replace the content on the canvas. Make sure the Global Name values are identical between the filter controls on both pages.
An example of the filter control selections is shown in the following image.
The page runs with the same filter control values as the ones you have selected on the previous page, as shown in the following image.
Note: If your page was created prior to the WebFOCUS Release 8205 and it uses the Global Name feature and contains default content, you must save it again using WebFOCUS Designer to ensure optimal performance.
Bookmarking allows users to save filter control selections and other run-time content customizations that they make in a page so that they can easily reapply them when they run the page again later. This is especially useful when there are many filter controls on a page that a user may want to apply each time they access it. Bookmarks are personal to each user and can easily be created and deleted as needed.
Bookmarking is enabled
automatically once the page has been saved, and is available in authored pages
created with new content and in assembled pages built from existing
content. To add a bookmark, make some filter selections when running a
page, and then click the
Bookmarks button
, which
appears on the page toolbar at run time. You are prompted to type a name for
the bookmark. Click
OK to apply it. A maximum of 46 characters display
for each bookmark name. Once applied, the bookmark is added to the list, which
you can open by clicking the drop-down menu arrow next to the Bookmarks button.
Select a bookmark from the list to refresh the page and apply the associated
set of filter values. The bookmark list also includes the
Original page option, which reloads the page with
the default filter values selected. From the bookmark list, you can also use
the menu for each existing bookmark to rename or delete the bookmark, or make
it your personal default set of filter values when you load the page, as shown
in the following image.
Each user can create a maximum of ten personal bookmarks for a page. If you reach this limit on a page, delete an existing bookmark to add a new one. The Original page bookmark is always available and cannot be deleted.
Bookmarks also save certain user customizations made in the page. For example, if you use on-chart filtering in an authored page at run-time to create a new filter, you can create a bookmark to save it. In authored pages, you can also change the filter condition from included values to excluded values and change the aggregation operation, and in assembled pages, you can change the content that displays in unlocked containers. All of these changes are saved when you create a new bookmark.
How to: |
When assembling pages from external content, you can personalize default values for filters in a page based on users or conditions. This feature uses an amper-amper (&&) global variable to specify the default option for a filter control. You can then use variables, functions, and conditions to set the values of these global variables. For example, you can set the Region value for a user, using the && global variable, and link it to the filter control to show their region as the selected value, or you can base the default values for a calendar control on the current date so that they always show a relevant, relative date range.
You can use global variables to dynamically set the default values of filter controls based on the user who is running the page.
The New Text Resource dialog box opens
The WebFOCUS Editor opens.
- &&DEFREGION -SET &&DEFREGION= IF &FOCSECUSER EQ user1 THEN 'North America' ELSE -IF &FOCSECUSER EQ user2 THEN 'EMEA' ELSE 'South America'
To map the FOCEXEC you just created in the Administration console, add the FOCEXEC path to the Paths to be executed on user Sign-in field in the Other section under Application Settings. The FOCEXEC path name can be copied from the Properties panel in the Hub or Home Page.
Note: If you are setting the FOCEXEC to be executed on sign in, make sure that the WebFOCUS user credentials are passed to the server. One way to do that is to set the server connection to Trusted and select the Pass WebFOCUS User ID and other Groups radio button. For more information on how to use Administration Console, see the WebFOCUS Security and Administration technical content.
The following image shows an example of the Default value property populated with the variable.
The default value for the Region filter control is North America, as shown in the following image.
The following image shows an example of the user with the username user2 running the page. The default Region value now is EMEA.
A calendar control in a page assembled from existing content is a combined control that allows you to filter for a date range by selecting a start date and an end date. You can use date functions to set global variables for the start and end date to a fixed length of time from the current date, then use those global variables as the default start and end date values for a calendar control.
The calendar control default dates must be entered using the full month name, for example, December 31 2019.
The New Text Resource dialog box opens.
The WebFOCUS Editor opens.
-SET &LASTWEEK = AYMD(&YYMD, -7, 'YYMD'); -SET &&FROM_DATE = CHGDAT('YYMD', 'MDYYX', &LASTWEEK, 'A17'); -SET &&TO_DATE = CHGDAT('YYMD', 'MDYYX', &YYMD, 'A17'); -DONE
Three variables are defined in this FOCEXEC: &LASTWEEK, &&FROM_DATE, and &&TO_DATE. &LASTWEEK is a variable that provides the date from one week ago. It does need to be used directly in the calendar control, so it is not created as a global variable. &&FROM_DATE and &&TO_DATE need to be saved for use as default values in the calendar control in our page, so they are created as global variables.
&LASTWEEK is created using the AYMD function, which takes a date, a number of days to add to that date, and a date format. In this case, we are using &YYMD, which is a system variable that provides the current date in YYMD (year-month-day) format. We are subtracting one week (seven days) from the current date. The date format is YYMD.
The date format needs to use the full month name, and must be in month-day-year order. We will use the CHGDAT function to convert the date to the proper format for both the &&FROM_DATE and the &&TO_DATE global variables. The CHGDAT function uses four parameters: the format of the input date, the order of the output date, the input date value, and the output date string format as an alphanumeric field.
The format of our two input dates, the date of one week ago set by the AYMD function and the current date, are both in YYMD format, so that is the first argument of both CHGDAT functions. Similarly, the output of both functions is MDYYX, which generates a date with the full month name in month-day-year order. Typically, the format for such a date would be MtrDYY, but since the CHGDAT function uses date character strings instead of actual date values, it has its own date format designations. MDYYX sets the date order as month-day-year, with the year written in four digits, and the X indicates that the full month name should be displayed.
The third argument of the CHGDAT function is the date to be converted. For the &&FROM_DATE variable, it is &LASTWEEK, which was previously defined in this FOCEXEC using the AYMD function. For the &&TO_DATE variable, it is &YYMD, a system variable representing the current date in YYMD format.
Finally, A17 defines the string length of the converted date. 17 characters is long enough to fit any date string.
For more information about the AYMD and CHGDAT functions, see the Using Functions technical content.
The FOCEXEC must be available to any users for whom you want to set default values in the page. Save it in a location where it will be accessible and then publish the FOCEXEC, or share it with any users after saving.
To map the FOCEXEC you just created in the Administration console, add the focexec path to the Paths to be executed on user Sign-in field in the Other section under Application Settings. The FOCEXEC path name can be copied from the Properties panel on the Hub or Home Page.
The following image shows an example of the Default value property populated with the variable.
The default date range in the calendar control is automatically set to the past week. The dates will update every day to always represent a period of one week.