Difference between revisions of "System Variables"

From SmartWiki
Jump to: navigation, search
Line 1: Line 1:
The '''System Variables''' setting on the [[Global Settings]] page allows you to create and edit system-wide variables within your instance.
+
=Overview= 
These variables can be referred to from anywhere within [[SmartSimple]] using the following syntax:
 
  
<font size="3">@system.''variable name''@</font>
+
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: 
 +
 
 +
: <span style="font-size: medium;">@system.''variable name''@</span>
 +
 
 +
'''Example:''' 
 +
 If you have created a System Variable named '''Tax Rate''' you would use:
  
  
'''Example:'''
 
If you have created a System Variable named '''Tax Rate''' you would use:
 
 
  @system.tax rate@
 
  @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:
 +
 +
: <span style="font-size: medium;">@system.library.''variable name''@</span>
  
 +
'''<br class="Apple-interchange-newline">Example:''' 
 +
 To return a list of languages from the global library, you would use:
  
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.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.
  
<font size="3">@system.library.''variable name''@</font>
+
You can also include links - for example, you can make a document of guidelines in [[SmartFolders Overview|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= 
  
'''Example:'''
+
1. Click on the 9-square menu icon on the top right of your page.
To return a list of languages from the global library, you would use:
+
 
@system.library.language@
+
:: {{Icon-Menu}} 
 +
 
 +
2. Under the heading '''Configuration, '''select '''Global Settings. '''
 +
 
 +
3. Under the subheading '''System Configuration, '''click on the hyperlink labelled '''System Variables. '''
  
'''Note:''' Library variables are available in all instances but can only be created and edited by SmartSimple.
+
A [[List View Overview|list]] of available system variables will be displayed.
  
 
==System 2==
 
==System 2==
Line 25: Line 40:
  
 
For example, if on a [[Web Page View]] you have a button that you want to have a different value based on the [[Language|langid]] of the user.
 
For example, if on a [[Web Page View]] you have a button that you want to have a different value based on the [[Language|langid]] of the user.
* Create 2 [[System Variable]]s with  
+
 
::* Name: '''Open1''' Value: '''Open'''
+
* Create 2 [[System Variable]]s with
::* Name: '''Open2''' Value: '''Ouvert'''
+
*:* Name: '''Open1''' Value: '''Open'''
 +
*:* Name: '''Open2''' Value: '''Ouvert'''
 
And refer to them on the [[Web Page View]] as follows
 
And refer to them on the [[Web Page View]] as follows
<pre>
+
 
<input type=button value="@system2.Open@me.langid@@" onclick="doThis()">
+
*
 +
<pre> <input type="button" value="@system2.Open@me.langid@@" />
 
</pre>
 
</pre>
  
Line 39: Line 56:
  
 
==Setting a System Variable==
 
==Setting a System Variable==
 
+
*# Go to [[Global Settings]]
# Go to [[Global Settings]]
+
*# Under the System Configuration heading, click on the hyperlink for System Variables.
# Under the System Configuration heading, click on the hyperlink for System Variables.
+
*# Click on the "New Variable" button and enter details:
# Click on the "New Variable" button and enter details:
+
*#* '''Name''' will be the variable name referenced in the '''@system.''variable name''@''' syntax.
:* '''Name''' will be the variable name referenced in the '''@system.''variable name''@''' syntax.
+
*#* '''Description''' is an optional narrative description.
:* '''Description''' is an optional narrative description.
+
*#* '''Value''' will be the value returned by the variable.
:* '''Value''' will be the value returned by the variable.
 
 
 
 
  If the Value is a date, use the ''yyyy-mm-dd'' date format.
 
  If the Value is a date, use the ''yyyy-mm-dd'' date format.
  
Line 52: Line 67:
  
 
==See Also==
 
==See Also==
* [[Pandora - Update a System Variable]]
+
*#* [[Pandora - Update a System Variable]]
* [[Root Company Variable]]s
+
*#* [[Root Company Variable]]s
 
 
 
[[Category:Global Settings]][[Category:Variables]]
 
[[Category:Global Settings]][[Category:Variables]]

Revision as of 15:25, 29 June 2019

=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.

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