Skip to content

Parameter Usage Scenarios

The role of parameters is to control the data within a dataset, such as data content, data presentation, and data access permissions. Therefore, parameter application is closely tied to datasets. Parameters are often used in the following scenarios:

Dataset Creation Process

During the dataset creation process, SQL statements, simple filters, and expression filters are used to filter data. In these scenarios, parameters can be used flexibly to control the filtering conditions, allowing the dataset's data to dynamically change with the parameters.

SQL Statement

In SQL statements, parameters are uniformly represented using the format {{%%parameter_name}}. At this point, only text replacement is performed on the parameters, and type validation is not conducted. As shown in the figure, data with milestone equal to 2.5 is filtered using the parameter milestone_parameter.

SQL statements are only used in SQL Queries datasets.

Simple Filter

The usage of simple filters is relatively straightforward; simply select the parameter from the dropdown box. As shown in the figure, data with milestone equal to 2.5 is filtered using the parameter milestone_parameter. The parameter type in simple filters needs to match the field type.

Parameters can be used in simple filters during dataset creation for Data Connections, Multi-Table Joins, Data Unions, etc.

Expression Filter

When using parameters in expression filters, you can click the parameter at the bottom left to fill it into the expression text box. As shown in the figure, the default value for the parameter milestone_parameter is 2.5. Using the expression {milestone} = {{%milestone_parameter}}, data is filtered to select records where milestone is 2.5, creating a new dataset.

Data Connection, Multi-Table Union allows the use of parameters in expression filters to control data.

Dataset Row Permission Control

Data row permissions can use parameters to dynamically control the scope of data accessible to users. As shown in the figure, by using parameters to control the dataset Incoming Details 1 for Group A, the content visible to Group A changes as the parameter value Start Date changes.

Dataset Content Changes

When creating new fields and new metrics in a dataset, parameters can be used to edit the content of fields and metrics.

  • When creating a new field using parameters, it enables dynamic fields. As the parameter value changes, the dynamic field updates accordingly, ensuring the latest content is used in calculations and charts.

  • When creating a new metric using parameters, it enables dynamic metrics. The metric changes as the parameter value changes, as shown in the figure.

Dataset Chart Creation

When creating charts in a dashboard, parameters can be used to control the display content of fields. As shown in the figure, in the chart filter, the parameter expression {{Incoming Details 1}}.{Incoming Start Time} >= {{%Start Date}} AND {{Incoming Details 1}}.{Incoming Start Time} <= {{%End Date}} controls the Incoming Start Time field content, thereby controlling the display content of the chart.

Parameter Control

Parameter controls adjust parameter values to control the display of charts within a dashboard. As shown in the figure, adjusting the time parameter value can retrieve data information for different time periods. Please read the Parameter Control section to understand how parameters control chart display through parameter controls.

Summary of Parameter Usage

Parameters have many application scenarios; note that their usage forms differ in SQL statements and expression filters.

  1. Parameters are used in SQL statements in the form {{%%Parameter Name}}.
  2. Parameters are used in expressions in the form {{%Parameter Name}}.

HENGSHI SENSE Platform User Manual