AX1533

Slider refresh variable

Slider refresh variables prompt users to select a value along a defined range of values, using a slider handle. The value is written back to the data source, where it can be used to impact data queries or other aspects of a report.

For example, you can use the slider variable to prompt users to select a number of years to show in the report. The value can then be used to impact the number of columns that are included in the query (or just which years are currently visible).

Axiom Software supports two types of variables that use slider handles. If you want users to be able to select a range of values instead of just a single value, use a RangeSlider refresh variable instead.

Variable behavior

The variable displays as a bar with a slider handle. Users can slide the handle along the bar to select a value within the defined range.

Desktop Client: Example Slider refresh variable

Web Client: Example Slider refresh variable

As the handle slides across the bar, the values show in a tooltip so that users can see the available values between the labeled tick marks (if applicable).

Variable properties

This section explains how to complete a variable row in the RefreshVariables data source when defining a Slider variable. Some data source columns do not apply in this case and are not discussed here. If these inapplicable columns are present in the data source, they should be left blank on rows that define Slider variable types. If you are using the Data Source Assistant to complete the variable properties, then only the applicable columns will be shown in the task pane.

For more information on the RefreshVariables data source in general, see Defining refresh variables.

General variable properties

All refresh variables use a common set of general properties such as the variable name, display name, and whether the variable is enabled or required. Any special considerations for Calendar variables are noted.

Column Tag Description

[Name]

The name of the variable. This name identifies the variable row in the data source, and is also used as the variable display name to users if a separate display name is not defined in the [DisplayName] column.

The name should not contain any non-alphanumeric characters such as question marks or periods. If you want the variable name that displays to users to include non-alphanumeric characters, use the display name.

The name cannot be dynamic; it must remain static because it is used to identify the variable. If you are configuring a dependent variable and you need the name to change based on the selection of the parent variable, then you must make the display name dynamic instead of the name.

[DisplayName]

Optional. The display name of the variable. If defined, the display name will be used instead of the name when the variable displays to users in the refresh dialog or filter panel.

For example, you might want to define the variable name as "Acct" but use a display name of "Account" or "Select an account".

[VariableType]

Specifies the variable type. Enter Slider to allow users to select a value from a range of defined values.

[IsEnabled]

Specifies whether the variable is enabled (True/False).

  • If True, then the variable will be included in the refresh dialog or filter panel.
  • If blank or False, then the variable will not be included in the refresh dialog or filter panel. This evaluation is determined when the dialog or panel is opened. If the variable is flagged as dependent using the [DependsOn] column, then the evaluation will be performed again after a value has been selected for the parent variable.

[SelectedValue]

The user's selected value for the variable will be placed in this cell. For Slider variables, the value is a number.

When setting up the file to use the variable value, point your formulas to this cell.

If you want to define a default value for the variable, use the [DefaultValueonOpen] field rather than entering the default value here.

[IsRequired]

This option does not apply to Slider variables and will be ignored. Technically, there is no way to clear the slider, as the slider handle is always on a value within the range. When a user applies the variable, the current value is written back as the selected value, even if the user has not interacted with the slider.

[DependsOn]

Optional. Specifies that the variable is dependent on another variable.

To make a variable dependent on another variable, enter the name of the "parent" variable. A variable should be flagged as dependent if the parent variable must be completed before the user can enter a value for the dependent variable.

Dependent variables can be updated dynamically in response to the selected value for the parent variable. For more information, see Using dependent refresh variables.

[DefaultValueonOpen]

Optional. Specifies a default value to be copied to the [SelectedValue] field on open. When the user opens the document and uses the refresh variables, the value specified here will be the initial selected value. This allows you to define a default value without needing to place the value directly in the [SelectedValue] field, where it could get overwritten by user selection and inadvertently saved.

NOTE: If you need to use a formula to determine the default value, the formula may not get calculated before the value is copied to the [SelectedValue] field. In this case you must still define the value in the [SelectedValue] field directly.

The default value is copied regardless of whether the variable is currently enabled or not. This allows you to set a default value for dependent variables that may not be initially visible, but will be visible based on the parent variable selection.

The default value must be valid in the context of the variable type and configuration. If the default value is not a value that could be entered or selected for the variable, validation errors or refresh errors may occur.

If no default value is specified, the slider handle starts at the minimum value.

[ClearSelectedValueonSave]

Optional. Specifies whether the selected value is cleared when the file is saved (True/False).

  • If True, then the selected value is cleared when the file is saved. You should set this to True if you want to ensure that the variable always starts off with no value after saving.

  • If blank or False, then the selected value is left as is when the file is saved. You should set this to False if you want to be able to set a "default value" for the variable, or if you want the last-selected value to be retained after saving the file.

[ClearSelectedValueonOpen]

Optional. Specifies whether the selected value is cleared when the file is opened (True/False).

  • If True, then the selected value is cleared when the file is opened. You should set this to True if you want the variable to start with no value when the file is opened.

  • If blank or False, then the selected value is not cleared when the file is opened. You should set this to False if you want the last-saved value to be retained when opening the file.

If you enable this option and also define a default value using [DefaultValueonOpen], then the current selected value is first cleared, then the default value is copied to the [SelectedValue] field.

[GroupName]

Optional. Defines a group name under which the variable will display. This option only applies to refresh variables used with Axiom forms; it will be ignored when using refresh variables with spreadsheet files in the Desktop Client.

If a group name is specified, then the variable will be displayed within an expandable / collapsible grouping in the Web Client filter panel (or when the form is viewed as a web tab within the Desktop Client). For more information, see Defining refresh variables for Axiom forms.

[CollapseOnOpen]

Optional. Specifies whether the group that this variable belongs to should start out collapsed when the form is opened (True/False). By default, groups start out as expanded.

This option only applies to refresh variables used with Axiom forms, and only if the variable has a defined group name. The option is ignored when using refresh variables with spreadsheet files in the Desktop Client.

If one variable in the group is set to True, then the group is collapsed, regardless of whether other variables in the group may be set to False (or blank).

Variable-specific properties

The following additional properties apply to Slider variable types:

Column Tag Description

[MinValue]

The minimum value for the slider bar. This value defines the smallest number that can be selected on the slider.

The slider handle starts at the minimum value if no default value is specified.

[MaxValue]

The maximum value for the slider bar. This value defines the largest number that can be selected on the slider.

[StepFrequency]

Optional. The frequency of step values within the range. For example, if the range is 0 to 100 and you specify a step frequency of 10, then step values are available at 0, 10, 20, and so on. The slider handle snaps to step values, so the step frequency determines which values the user can select within the range.

The slider bar shows up to seven major tick marks with step values. All other steps are shown using minor tick marks, with the value visible in a tooltip as the user slides the handle.

Example slider tooltip

If the step frequency is not specified, then by default the range is divided evenly into 50 step values.

[DisplayFormat]

Optional. A display format for the values in the range, using an Excel number format string.

Only very basic numeric formats are supported, such as to specify decimal places, currency symbols, and percentage signs. More advanced number formats, like colors and parentheses for negative numbers, are not supported. For example:

  • 0 for whole numbers
  • 0.0 for numbers with one decimal place
  • 0.0% for percentages with one decimal place

IMPORTANT: The number format must be entered as a string. You can precede the number with an apostrophe to cause it to be treated as text, such as '0.0%, or you can change the cell format to Text. If you enter just a number into the cell, then it will not be recognized as a number format string, even if the number is formatted the way you want.

The following properties do not apply to Slider variables: PlaceHolderText, ListChoices, ColumnName, AdditionalColumns, ColumnFilter, AllowMultiSelect, DataSourceName, Hierarchies, UseAsQuickFilter, TooltipColumn, PrimaryTable, LimitColumn, AutoQuoteString, MinDate, MaxDate.

Example data source

The following screenshot shows example Slider variables: