AX1010

CheckBox refresh variable

CheckBox refresh variables prompt users to enable or disable something by using a check box. The value True (checked) or False (unchecked) is written to the RefreshVariables data source. This value can then be used to enable or disable something that impacts the data refresh.

For example, you can use the check box to prompt users to indicate whether a certain set of data should be included in a report. Imagine that you have a report that always includes approved capital requests, but you want to give users the option to also include pending capital requests. The user can use the check box to include the pending requests or not. If the selection is binary, a check box may be more effective than a drop-down list.

Variable behavior

The variable displays as a check box. The user can check or clear the check box.

Desktop Client: Example CheckBox refresh variable

Web Client: Example CheckBox refresh variable

If the variable is optional and it starts out with no value—meaning blank for [SelectedValue]—then the value False will not be written to the data source if the user leaves the check box unselected. Instead, the selected value is left as blank. To avoid this blank case, it is recommended to configure CheckBox variables as required. This forces the current value of the check box to be written to the data source, even if the user does not interact with the check box. Additionally (or alternatively), you can define a default value for the check box in the [SelectedValue] field, so that it starts out as True or False instead of blank.

Variable properties

This section explains how to complete a variable row in the RefreshVariables data source when defining a CheckBox 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 CheckBox 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 CheckBox variables are noted.

Column Tag Description

[Name]

(missing or bad snippet)

[DisplayName]

(missing or bad snippet)

[VariableType]

Specifies the variable type. Enter CheckBox to allow the user to enable or disable a check box.

[IsEnabled]

(missing or bad snippet)

[SelectedValue]

The user's selected value for the variable will be placed in this cell. For CheckBox variables, this means either True (checked) or False (unchecked).

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

[IsRequired]

For CheckBox variables, this property simply determines whether a value is always written back to the [SelectedValue] field, even if the user does not interact with the check box. If True, then a value is always written back.

If this property is blank or False, then the current state of the check box will not be written to the [SelectedValue] field if the user does not change the state of the check box.

For example, if the selected value of the check box starts out as blank, then the variable will display to the user as unchecked. If the user leaves the variable unchecked, then the selected value will remain blank if the variable is not required. However, if the variable is required, then the selected value will be set to False.

It is recommended to enable this property for CheckBox variables so that the check box always has an explicit True or False value, so that you do not have to handle the blank case. Additionally (or alternatively), you can populate the selected value with True or False so that the variable does not start out as blank.

Configuring a CheckBox variable as required does not mean that the user must interact with the check box in order to refresh data. The check box only has two available states, and the current state may be the desired state. For this reason, required CheckBox variables do not display with the red "required" formatting in the Web Client.

[DependsOn]

(missing or bad snippet)

[DefaultValueonOpen]

(missing or bad snippet)

For CheckBox variables, it is often useful to assign the variable a default value of True or False so that you do not need to handle the blank case in any formulas.

[ClearSelectedValueonSave]

(missing or bad snippet)

[ClearSelectedValueonOpen]

(missing or bad snippet)

[GroupName]

(missing or bad snippet)

[CollapseOnOpen]

(missing or bad snippet)

Variable-specific properties

CheckBox variables do not have any variable-specific properties. Only the general variable properties are available.

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

Example data source

The following screenshot shows an example CheckBox variable. In this example, the CheckBox variable is required, and a default value of False has been defined for the variable, so that it starts off as unchecked. This configuration is intended to ensure that the variable never has a blank value, so the blank case does not need to be handled in formulas.