Enabling Field Selection at Run Time With Field List Parameters
Field list parameters are a powerful tool that allows you to provide users with a selection of fields that they can use at run-time to build charts and reports within a framework that you provide. Field list parameters can be added to buckets in place of fields in a chart or report. At run time, users select the fields that they want to display, giving them the power to choose the data that is represented by and displayed in your content. You can complement these field list parameters with fields that always appear in your content, providing a mix of customizable and static content. Field list parameters can be single select or, if the bucket allows multiple fields, multi-select, providing even more flexibility. Field list parameters are a key component of InfoApps, which are pages in which users can select the fields that display.
When you add a field list parameter, it becomes a field container into which you can add one or more measure and dimension fields. Create a new parameter by clicking Add Parameter Field List on the Settings tab. The Add Parameter Field List dialog box opens, as shown in the following image.
Here, you can supply a prompt name, used as a label for the field list control and bucket, choose which bucket the field list selections should populate, and determine whether the field list parameter is single select or multi-select. Multi-select field list parameters are not available for charts, so when creating a chart, the Control type option is locked to Single select. When you click Save to create the parameter, a field list parameter placeholder appears in the location selected from the Bucket Type menu, and a new field list parameter bucket appears below the Filters bucket. The placeholder is a purple color to distinguish it from regular measure and dimension fields.
To add fields to the field list parameter, drag them into the new field list parameter bucket. Field list parameter buckets only accept the types of fields that can be added to the bucket that the field list parameter has been added to. For example, if the field list parameter was created for the Location bucket, only fields with an assigned geographic role can be added to it. The following image shows the buckets for a report, in which the Product Category, Sale Year, Sale Quarter, and Customer Business Region fields have been added to a field list parameter, and the parameter itself has been added to the Rows bucket.
The order of the fields in each field list parameter bucket is the order in which they will appear in the field list filter prompt when you run your content. Click the check box icon next to the field name in the field list parameter bucket to set default values for each field list control. For field list parameters with a Control type of Multi-select, you can choose to have multiple fields selected by default. If parameter prompting is set in your environment to run content with default values without showing autoprompt, then when you run content in which default values have been set for all field list parameters, you will not be prompted to select fields for your content.
You can right-click a field in a field list parameter bucket to make some simple modifications to it. You can rename a measure or dimension field to change the name that it uses in the field list control when the content is run. The original field name is still used in the content itself when the field is added to it. You can also right-click a measure field in a field list parameter bucket and point to Aggregate to change the aggregation of the field. This allows you, for example, to make both summed revenue and average revenue fields available in the field list.
To edit or delete a field list parameter, click the ellipsis menu on the field list parameter bucket, and click Edit or Delete. You can also delete a field list parameter by pointing to it in the standard chart or report bucket to which it was added, and clicking the X that appears when you point to it. To remove a field from a field list, point to the field in the field list parameter and click the X, or right-click it and click Remove. To remove all fields from the field list, click the ellipsis menu for the field list parameter bucket and click Clear.
You can create multiple field list parameters, and add them to buckets together with regular fields that will always appear in your content, allowing you to have a mix of permanent and user-selected fields in your charts and reports. Just like regular fields, field list parameters can be reordered relative to other fields and field list parameters in a bucket, giving you some control over the sort order of your content, even when user-selected fields are used. Parameters can be added to any bucket in a report, and in any chart bucket, with the exception of the Multi-graph bucket.
When you run a chart or report with field list parameters, you can select the fields with which each one should be populated using standard filter controls for alphanumeric values. If the chart or report is run stand-alone, these controls are presented in the autoprompt interface. If the chart or report is added to an assembled page, you can create filter controls for each field list parameter to allow users to select fields for each one. The following image shows a page with controls for multiple field list parameters.
When adding content with multi-select field list parameters to an assembled page, changing the filter control type to a double list control, or to a check box control with the Allow reordering option enabled, makes it possible to reorder the selected fields at run time. This provides even more control over the display of your content when run in a page.
Note: Field list parameters are unavailable in pages created with new content. Charts and reports with field list parameters cannot be converted into a page. To add content with field list parameters to a page, create an assembled page using the Assemble Visualizations option on the plus menu of the WebFOCUS Home Page.