System Variables

From SmartWiki
(Redirected from System library)
Jump to: navigation, search

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.

052919 MenuIcon.png 

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.

Sys variables list.png

You can use the Search function on the top right at any point to specify the results of the list of system variables.

Setting a System Variable

Once you have accessed the list of System Variables via Global Settings, you can set new system variables. 

1. Click on the icon on the top left of the System Variables list page to create a new system variable.

2. The new system variable form will be displayed: 

New sys variable.png

Fill in the fields appropriately: Name, Description, and Value. The ID field will be autopopulated.

Note: Once you set the Name of a system variable and save it, it cannot be changed. 

3. Click Save when you are done filling out the fields. 

The page will reload and the page title will be redisplayed as Edit rather than New, with the Name field now greyed out as it is non-editable. 

Any changes that you make to the system variable from this page will be impacted system-wide for any reference to this specific system variable. 

Update History

There will be a reload icon at the top left of your System Variable page.

Update history icon.png 

This icon, when clicked, will reveal the Update History related to any revisions made on this specific system variable. 

Sys variable update history list.png 

By providing information related to each update - including a date and time stamp, the name of the user who made the modification, the comparative difference in the Value and Description fields, etc - you can keep track of any changes made to this system variable. 

Deleted System Variables

The third tab of the System Variables page is labelled 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 up to one year; beyond one year, 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.

Deleted sys variables.png

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

    1. Go to Global Settings
    2. Under the System Configuration heading, click on the hyperlink for System Variables.
    3. 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.

See Also