AX2323
Defining default values for refresh variables
Refresh variables do not support a specific "default value" property. However, if the [SelectedValue]
cell is populated with a valid value when the user triggers a refresh, this value will be pre-selected for the variable. The user can then choose to leave the current contents as is, or specify a different value for the variable.
For example, if the [SelectedValue]
cell for the Region variable contains the text "Northwest", then when the Refresh Variables dialog opens (or when the filter panel opens in the Web Client), the Region variable is automatically set to Northwest.
If the user changes the value to Southwest, then the text "Southwest" is now placed in the [SelectedValue]
cell. If the user refreshes the file again in the same session, the Refresh Variables dialog will now display Southwest as the "default value" for Region.
When you are initially setting up the file, you can place a value into the [SelectedValue]
cell to be used as the default value for a particular variable. This value can be "hard-coded" into the cell, or you can use a formula to derive the value. When a user refreshes the file, this formula or value will be overwritten with the user's selection for the variable. However, as long as the user cannot save the file with these changed values, the original default values will be preserved the next time the file is opened. This means that users who do have save permission to the file must be careful not to inadvertently overwrite these values and then save.
When setting a default value by completing the [SelectedValue]
cell, you should make sure the value is valid for the variable. If an invalid value is present, the variable behavior differs depending on the variable type and the client where the variable is being used. In some cases, the invalid value displays with a message to the user, and in other cases the invalid value is ignored and the variable displays as blank.
Blank default values
If instead you want to ensure that a variable always starts off blank (no previously selected value), then you should enable one or both of the following options for the variable:
-
[ClearSelectedValueonOpen]
: This clears the selected value for the variable when the file is opened. Even if a value is saved in the file, it will be cleared on open so the next user will not see it. -
[ClearSelectedValueonSave]
: This clears the selected value for the variable when the file is saved. This will prevent any selected values from being inadvertently saved in the file. However, if a user saves the file mid-session, with the intent to continue working in the file, then they will need to re-select values for any cleared variables.