System Variables are values created and modified on the Global Settings page that apply across an entire SmartSimple site. Because each reference points to a single stored value, a change made in one location updates every place the variable is used.
Who: Global administrators
When to Use System Variables
Use System Variables when:
- The same value needs to appear in more than two places in a site and should be maintained in a single location.
- A shared resource is published as a URL and referenced through a variable. For example, a guidelines document stored in SmartFolders can be referenced this way, so updating the source updates every reference.
- A reviewer-scoring process requires a standardized scoring protocol applied across the system.
- A value needs to change based on the user's language, using context-based (system2) variables.
How System Variables Work
System Variables are referenced using one of the following syntax patterns:
| Syntax | Returns |
|---|---|
| @system.variableName@ | The value of a System Variable created in your site. |
| @system.library.variableName@ | A value or function from the global System Library. |
| @system2.variableName@me.langid@@ | A context-specific variable selected by the user's language ID. |
System Library Variables
A global System Library is available as system variables. The Global Settings page lists its values and functions under System Variables, referenced using the following syntax:
@system.library.variableName@
For example, @system.library.language@ returns the list of languages from the global library.
Context-Based Variables (System2)
A variable name can be pre-processed so that a different System Variable is returned based on context. For example, a Web Page View button can display a different value based on the langid of the user. Create two System Variables: one named Open1 with the value Open, and one named Open2 with the value Ouvert. Then reference them on the Web Page View as follows:
<input type="button" value="@system2.Open@me.langid@@" />
The system replaces @me.langid@ with 1 or 2 depending on whether the user's primary language is English or French (Canada), and returns the matching System Variable.
Deleted System Variables
The Deleted System Variables tab lists deleted variables for up to 90 days. Within that 90-day window, an administrator can restore a deleted variable or purge it manually. After 90 days, the system automatically purges deleted variables, and they can no longer be recovered.
Resources
For more information about System Variables, see: