Overview
The System Variables configuration on the Global Settings page enables the creation and modification of system-wide variables within your instance. These variables can subsequently be referenced throughout your SmartSimple environment utilizing the following syntax:
@system.variableName@
Example: If you have established a System Variable named Tax Rate you would utilize:
@system.tax rate@
A global System Library can be accessed as system variables. The available values and functions can be located under System Variables on the Global Settings page. The syntax is as follows:
@system.library.variable name@
Example: To retrieve a list of languages from the global library, you would employ:
@system.library.language@
- Note: Library variables are accessible in all instances but can only be created and modified by SmartSimple.
- Note: It is advisable to utilize and create system variables if a particular item needs to be repeated more than twice.
- Tip: System Variables serve as a valuable resource should you require the restoration of ID numbers, search areas, signatures, email addresses, etc.
Additionally, you can incorporate links; for instance, you may convert a document of guidelines in SmartFolders into an Internet-enabled URL, subsequently uploading this link to System Variables to disseminate the documents universally. Should that document undergo changes, you would only need to amend the content in a single location. Other potential applications for System Variables could include a standardized scoring protocol if your system employs a reviewer-scoring process.
Accessing System Variables
System Administration (gear icon) >> Global Settings >> System (tab) >> System Variables
A list of available system variables will be displayed:
You may utilize the Search function located at the top right at any time to refine the results of the list of system variables.
Setting a System Variable
Upon accessing the list of System Variables via Global Settings, you can establish new system variables.
1. Click on the + icon at the top left of the System Variables list page to create a new system variable.
2. The new system variable form will be presented:
Complete the fields as required: Name, Description, and Value. The ID field will be auto-populated.
Note: Once you establish the Name of a system variable and save it, it cannot be altered.
3. Click Save once you have completed the fields.
The page will refresh, and the page title will be displayed as Edit instead of New, with the Name field now grayed out as it is non-editable.
Any modifications you make to the system variable from this page will be applied system-wide for any references to this specific system variable.
Update History
There will be a reload icon at the top left of your System Variable page.
This icon, when clicked, will disclose the Update History pertaining to any revisions made on this specific system variable.
By providing details related to each update - including a date and time stamp, the name of the user who executed the modification, the comparative difference in the Value and Description fields, etc. - you can monitor any changes made to this system variable.
Deleted System Variables
The third tab of the System Variables page is titled Deleted System Variables and will provide a list of all deleted system variables for up to one year.
Deleted system variables can be restored only within a one-year timeframe; after this period, they will be automatically purged from the system.
Clicking on a deleted system variable will allow you to choose to purge it manually or to restore it back into the system.
System 2
You can also pre-process the variable name to access different system variables based on the context.
For instance, if on a Web Page View you have a button that you wish to display a different value based on the langid of the user.
- Create two System Variables with
- Name: Open1 Value: Open
- Name: Open2 Value: Ouvert
And reference them on the Web Page View as follows:
<input type="button" value="@system2.Open@me.langid@@" />
The system will replace @me.langid@ with either 1 or 2 depending on whether the current user has their primary language set to English or French (Canada). It will retrieve the relevant System Variable.
Note: Do not utilize @system2. variables to populate the "options" for fields such as a Combo Box or Check Boxes if you wish to enable search functionality using those fields. The system will not be able to process the variable when searching from the List View. If employing system2 (with @me.langid@) to manage different user languages, the Custom Field Language Settings should be utilized to obtain the language-specific option values.
Setting a System Variable
-
- Navigate to Global Settings
- Under the System Configuration heading, click on the hyperlink for System Variables.
- Click on the "New Variable" button and input the details:
- Name will be the variable name referenced in the @system.variable name@ syntax.
- Description is an optional narrative description.
- Value will be the value returned by the variable.
If the Value is a date, please use the yyyy-mm-dd date format.
Note: System Variables cannot be renamed once saved. To rename, create a new variable with the desired name, and delete the old System Variable.