Skip to content

Parameters

HENGSHI SENSE introduces the concept of parameters, primarily to achieve flexible control of applications. Previously, modifying multiple places was required to achieve application versioning functionality. By creating parameters, all issues are resolved by modifying only one place.

Parameters can achieve:

  • Parameterized Creation of Datasets
  • Parameterized Control of Permissions
  • Parameterized Charting of Dashboards/Charts
  • Parameter Controller Involvement in Dashboard Layout

Parameter Operations

Common operations for parameters include creating parameters, editing parameters, deleting parameters, and grouping parameters.

Create Parameter

Follow the instructions below to create a parameter.

  1. Click App -> Parameters -> New Parameter to open the new parameter dialog.
  2. Fill in the parameter name and select the parameter type. The parameter type supports text, number, date, and time.
  3. Set the allowed values and default value for the parameter. In the example, a Fixed List was used, manually inputting values 1-31, and the default value was selected from the Incoming Start Date (Day) field in the dataset Incoming Details 1.
  4. The parameter creation is complete.

The parameter creation process is relatively simple, but due to its flexibility in use, parameters can be complex in terms of setup and usage. Please read Parameters for detailed function settings of parameters, and read Parameter Usage Scenarios to understand the application scenarios of parameters.

Tip

  1. Parameters can be created in app creation or in the dataset market.
  2. The scope of parameter application is the datasets in this app or this data package, and these datasets can use parameters in scenarios such as creating charts, row permissions, etc.

Edit Parameters

Click the three-dot menu in the parameter list, select Edit Parameter from the pop-up menu, and the edit parameter window will pop up for modifying the parameter.

If the parameter has already been used, the following situations may occur when re-editing:

  • When editing the parameter name, places where the parameter is used in the expression will report an error, indicating that the parameter xxx does not exist.
  • When editing the parameter type, places where the parameter is used will encounter errors.
  • If you only modify the optional values of the parameter without changing the parameter name and parameter type, no errors will be reported.

Delete Parameter

Click the three-dot menu in the parameter list, and select Delete from the pop-up menu to delete the parameter.

Parameter Settings

Each parameter consists of four parts: parameter name, parameter type, allowed values, and default value.

  • Parameter Name: The name of the parameter.
  • Type: The parameter type is divided into four types: text, number, date, and time.
  • Allowed Values: The allowed values for the parameter support three forms: any, list, and range.
    • Any: Indicates that the parameter can take any value of that type. For example, a text parameter can take any text as the parameter value, and a number parameter can take any number as the parameter value.
    • List: Indicates that the allowed values for the parameter are a list, and the value needs to be taken from the list when using the parameter.
    • Range: Indicates that the allowed values for the parameter are a range, and the value taken when using the parameter needs to satisfy the range. There is no range value for text type.
  • Default Value: After the parameter is created, a default value can be configured. The method of setting the default value is related to the allowed values and the parameter type.

Below is a detailed introduction to the allowed values and default settings for various parameters.

Any

When the parameter allows values to be selected of any type, it indicates that the parameter can take any value of that type. For example: a text parameter can take any text as the parameter value, a numeric parameter can take any number as the parameter value, a date parameter can select any date as the parameter value, and a time parameter can select any time as the default value.

When the allowed value is any, its default value can be set to no default value, fixed value, dynamic value, and relative value (text parameters and numeric parameters have no relative value).

  • Fixed Value: Manually edit specific values as parameter values, which remain unchanged by default when the parameter is used.
  • Dynamic Value: Select a field of the corresponding type from all datasets in the application as the default value. When the value of the dataset field changes, the default value of the parameter also changes accordingly. As shown in the figure, the text parameter selects the Service Selection field from the Call Details 1 dataset in the application as the default value, which is Button 1. When the field content changes, the default value will also change.
  • Relative Value: The default value of date parameters and time parameters can be set to relative values. Relative values change over time. As shown in the figure, the default value of the time parameter is set to the relative date 1 day ago. When the system date is January 2nd, the parameter default value is January 1st; when the system date is January 3rd, the parameter default value is January 2nd.

List

When the parameter allows value selection from a list type, it indicates that the parameter needs to be selected from the list when used. The parameter list contains both the value and the display value. The display value is used for presentation, while the actual content of the value is used during the calculation process. The display value can be configured; if not configured, the content of the value is displayed.

Lists support both fixed and dynamic configuration methods.

Fixed List

Fixed lists are lists with fixed content that do not change, supporting manual input and value extraction from fields.

  • Manual Addition: Manually edit the values and display values of the list.

  • Add Values from Fields: Select fields of the corresponding type from the dataset as list values, supporting the addition of one or multiple fields. The values added to the list can be edited and modified. After the values are added, the display values need to be manually edited.

Dynamic List

The dynamic list selects the corresponding type of field from the dataset as the list value, and only one field is supported to be added. After the value is added, a display value can be added. The display value is selected from another field in the same dataset, and it is required that this field corresponds one-to-one with the value field content.

Tip

The values and display values in the dynamic list are the field contents in the dataset. If row-level permissions are set for this dataset, users with different permissions will see different parameter values.

Default Value for List

List default values support four settings: no default value, fixed option, dynamic option, and dynamic item.

  • Fixed option: Select a fixed option content from the list as the default value.
  • Dynamic option: Specify the Nth item in the list as the default value, and the default value changes with the list order.
  • Dynamic item: Select the corresponding type of field from all datasets in the application as the default value. When the value of the dataset field changes, the parameter default value changes accordingly. If the value of the dynamic item is not within the list, the parameter creation fails and the default value needs to be reselected.

Multi-value Parameters

When the parameter allows values to be a list, the multi-value function can be enabled for the parameter. You can set the delimiter, start and end symbols, and prefixes and suffixes for multi-value parameters. After enabling multi-value parameters, you can set multiple default values.

Scope

When the allowed value of a parameter is a range, it indicates that the parameter's value meets the range requirement. This type is not applicable to text parameters.

Numeric Parameter Range Value

The range value of the numeric parameter can be set with a minimum value, maximum value, and step size. The step size represents the difference between two valid values and can be set optionally, with a default value of 1, which cannot exceed the difference between the maximum and minimum values. As shown in the figure, with a minimum value of 5, a maximum value of 100, and a step size of 1, the valid values within the parameter range are 5, 6, 7, 8... 100. If the step size is 95, the valid values within the parameter range only include 5 and 100.

Default value settings support three types of settings: no default value, fixed value, and dynamic value.

  • Fixed Value: Enter a value within the specified range as the default value. If the input value exceeds the range, it will be automatically corrected to the boundary value. If a step size is set, and the input value is not within the range but is between the minimum and maximum values, it will be automatically corrected to the previous range value. As shown in the figure, the parameter range values are 0, 3, 6...99. When the input is 5, it will be automatically corrected to 3.

  • Dynamic Value: Select a numeric field from all datasets in the application as the default value. When the value of the dataset field changes, the default value of the parameter also changes accordingly. If the field value is out of range, the parameter will report an error.

Date Parameter Range Value

The range value of the date parameter needs to be set with a start date, an end date, and a step size. The step size can be optionally set, with units of day, week, month, quarter, year. After setting the step size, the number of steps within the range will be prompted.

Default value settings support no default value, fixed date, relative date, and dynamic value.

  • Fixed Date: Select a date from the range as the default value.
  • Relative Date: Set the default value relative to the current system date.
    • When no step is set, the relative date can be adjusted by time unit as shown. If the default value is out of the time range, it will be automatically corrected.
    • After setting the step, the relative date is set in units of the step, and it will be automatically corrected if it exceeds the time range.
  • Dynamic Value: Select a date field from all datasets in the application as the default value. When the value of the dataset field changes, the parameter default value changes accordingly. If the field value is out of range, the parameter will report an error.

Time Parameter Range Value

The range value of the time parameter needs to be set with a start time, end time, and step size. The step size can be optionally set, with units in seconds, minutes, hours, days, weeks, months, quarters, years. After setting the step size, the number of steps within the range will be prompted.

The setting of time parameters is similar to that of date parameters, so it will not be described in detail here.

Parameter Grouping

Parameters support grouped display, grouping parameters with related business meanings together, facilitating the search and use during the data analysis process.

Click Parameter Grouping, the Parameter Grouping window pops up.

Click on "New Group", enter the group name and press Enter to create a parameter group. Select the group, add parameters to it on the right side, and finally click the "OK" button to complete the parameter group.

On the parameter page, you can see the grouping information for each parameter. A parameter may be assigned to multiple groups, with multiple grouping tags.

Find parameters by grouping to quickly locate fields with relevant business meanings.

Parameter Description

  1. Can the default value of a parameter be specified to select a specific item from a field when it is a dynamic value?

    When the default value of a parameter is a dynamic value, only the first item of a field or indicator can be selected as the default value.

  2. When using a parameter, the chart suddenly reports an error indicating no suitable range value?

    When the allowed values of a parameter are "list" or "range," as time progresses, the parameter value may fall outside the list or exceed the specified range, causing the dataset or chart using this parameter to report an error.

  3. The same parameter shows different values for different users?

    The values of a dynamic list parameter are derived from the dataset fields, so the parameter values will change dynamically with the field content. If row-level permissions are applied to the dataset, different users will see different parameter values due to their varying permissions.

  4. The same parameter shows different default values for different users?

    When the default value is of a dynamic value type, it will select the content of the fields in the dataset as the default value. If row-level permissions are applied to the dataset, different users will see different default values due to their varying permissions.

HENGSHI SENSE Platform User Manual