System Variables
Contents
Overview
The System Variables setting on the Global Settings page will allow you to create and edit system-wide variables within your instance. These variables can then be referred to from anywhere within your SmartSimple copy by using the following syntax:
- @system.variable name@
Example: If you have created a System Variable named Tax Rate you would use:
@system.tax rate@
A global System Library can be accessed as system variables. The available values and functions can be found under System Variables on the Global Settings page. The syntax is:
- @system.library.variable name@
Example: To return a list of languages from the global library, you would use:
@system.library.language@
- Note: Library variables are available in all instances but can only be created and edited by SmartSimple.
- Note: It is best to use and create system variables if you need to repeat something more than twice.
- Tip: System Variables is a helpful resource should you ever need to restore ID numbers, areas you search, signature, email address, etc.
You can also include links - for example, you can make a document of guidelines in SmartFolders into an Internet-enabled URL, then upload this link to System Variables in order to place the documents everywhere. If that document then changes, you would only have to modify the content in one place. Other use-cases for System Variables might include a set scoring protocol if your system uses a reviewer-scoring process.
Accessing System Variables
1. Click on the 9-square menu icon on the top right of your page.
2. Under the heading Configuration, select Global Settings.
3. Under the subheading System Configuration, click on the hyperlink labelled System Variables.
A list of available system variables will be displayed.
You can use the Search function on the top right at any point to specify the results of the list of system variables.
System 2
You can also pre-process the variable name to access different system variables based on the context.
For example, if on a Web Page View you have a button that you want to have a different value based on the langid of the user.
- Create 2 System Variables with
- Name: Open1 Value: Open
- Name: Open2 Value: Ouvert
And refer to 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 if the current user has their primary language set as English or French (Canada). They will pull the relevant System Variable.
Note: Do not use @system2. variables to populate the "options" for fields such as a Combo Box or Check Boxes if you wish to be able to search using those fields. The system will not be able to process the variable when searching from the List View. If using system2 (with @me.langid@) to process different user languages the Custom Field Language Settings should be used to obtain the language specific option values.
Setting a System Variable
- Go to Global Settings
- Under the System Configuration heading, click on the hyperlink for System Variables.
- Click on the "New Variable" button and enter 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, use the yyyy-mm-dd date format.
Note: System Variables cannot be renamed once saved. To rename, create a new variable with the new name, and delete the old System Variable.