Differences between custom settings and variables
When users first sign in to applications, the initial values that they are presented with are the default values of variables. Actions, and other options in reports, enable users to change the initial values and they no longer use the defaults.
Variables can be persistent or non-persistent according to the behavior you want to achieve. If a user changes a preference and that preference is stored in a persistent variable, the preference is stored if the user signs out. If the variable is non-persistent, the user must reselect the preference when they next sign in.
You can use variables to assign different values to different users according to those users' roles.
Use non-persistent variables if you want an administrator to provide default values but enable users change the values during their sessions. For example, provide a default scaling for reports but allow users to make changes.
Custom settings have only one value. That value can be read by lists and functions. Unlike variables, custom settings are always global. They do not store the selections of individual users. A change to the value of a custom setting affects all users. Thus, custom settings are primarily a feature for administrators.
Use custom settings for settings that are for all users and which only an administrator will change. For example, specify a reporting month and data configuration.
You can use the .DefaultText
and .TEXT
functions to read
and update the default and user values of variables, and the values of custom settings. For
example:
=GlobalVariables.Period.DefaultText
=CustomSettings.Period.DefaultText
=GlobalVariables.Period.Text
=CustomSettings.Period.Text
.DefaultText
is supported by custom settings to help facilitate migrations.
You can use custom settings and global variables in the same places. For example:
- Actions
- Formulas
- Dropdowns
- Lookups
- Lists
- Report parameters