ScriptVar

<< Click to display Table of Contents >>

Navigation:  Templates >

ScriptVar

ScriptVars are used as wildcards in the Info text. These wildcards are very useful in combination with Templates, when standardised messages are sent frequently. You can add ScriptVars into your text at certain positions, whose values can be adjusted before sending the Info. This can make the process of sending standardised messages easier and faster.
 

The App ScriptVar (Templates -> ScriptVar) is available for the creation of ScriptVars. Here you can create and manage ScriptVars, which you can use afterwards while creating an Info.

 

Creating ScriptVars

 
With the App ScriptVars you have the opportunity to create ScriptVars with different types, like a selection or date field. Additionally ScriptVars can be defined with a default value and also an user defined script in order to create and adjust certain values dynamically.
 

In order to create a predefined ScriptVar, open the App ScriptVar (Templates -> ScriptVar) and click on Sv_01 (New) in the toolbar. Enter a name and optional a description for your ScriptVar in the appearing form. Later the name will be essential for the usage of the ScriptVar.
 

Select the type of your Scriptvar afterwards. The following types are available:
 

Type

Description

Text field

A simple field where any value can be entered.

 

Sv_04

 

Result (Infopreview):

 
Sv_05

Single selection

A selection field where a value can be selected from a predefined list. Each value has to be separated through a line break.

 

ScriptVar_SingleSelection2

Each value will be separated through a line break.
 

ScriptVar_SingleSelection3

Later in the preview of the Infoeditor.

 

Multiple choice

A selection field where multiple values can be chosen. A standard value is needed. You can enter multiple standard values via the standard value field. Each value has to be seperated via a line break.

 

ScriptVar_MultipleChoice1

 

Result (Preview):

ScriptVar_MultipleChoice2

 

Date

Provides a field for values with the format MM/DD/YYYY. When using the ScriptVar it will additionally provide a calendar widget where a date can be easily selected from a calendar.

 

Sv_09

 

ScriptVar_Date_format

 

Sv_12

Time

A field for a time value in the format HH:MM. This format will be automatically converted into AM or PM. Additionally a selection list will be provided, where other times can be selected. Please note that the listed values are separated by a step of 15 minutes.

 
Sv_13

 

ScriptVar_time_format

 

No default value will be defined if this field stays empty.

A time from the 24 hour range will be automatically converted into the format AM or PM.
 

Sv_16

Script

Here you can select a predefined script, which adjusts or fills a value dynamically into the field (e.g. the current date).

 
Sv_17

 

ScriptVar_Script_Selection
 
Sv_19

The ScriptVar “getDate” is a predefined script example which will print the current date in the preview.

The script has been written in the programming language “Erlang”. “Pascal” can also be used.

 

A default value can be defined in the field Standard value optionally, which will be entered automatically into the field when using the ScriptVar in the Infoeditor.

 

Inserting a ScriptVar
 

In order to insert a created ScriptVar into an Info, the menu point ScriptVars is available in the toolbar of the Infoeditor.
 

Open the Infoeditor (Info > Infoeditor) and select the ScriptVar through the selection list in the toolbar of the editor.
 

ScriptVar_Select_ScriptVar

 
 

vorschau1

In order to add your input into the Info text, click on next.

 

vorschau2

 


ScriptVars can be manually added in the Info text too, without creating them before. The type Text field will be used as default. The ScriptVar can be placed in the Info text with the following syntax: [ScriptVar=Field name].

 

 

Example: Creating a ScriptVar and adding it into a Template

 
As an example we want to create a template, which will be used when a certain server is under maintenance and the affected users should be informed. In this case the person of charge can use the template with the predefined Info text, select the affected server from a list and send the predefined Info.
 

Please proceed as follows:
 

1. Create a new ScriptVar with the type Single selection.
 

ScriptVar_SingleSelectionExample_1

 

2. Define every single server in the field Standard value, that should be selectable in the ScriptVar. Separate each entry through a line break.
 

ScriptVar_SingleSelectionExample_2

 

3. Save the ScriptVar.
 

4. Open the App New Info and enter your Info text in the editor. (e.g. “The server is currently under maintenance.”)
 

5. Place the cursor inside the text, where you want to insert the ScriptVar and select the created ScriptVar through the field ScriptVar.
 

ScriptVar_SingleSelectionExample_3

 

ScriptVar_SingleSelectionExample_4

 

ScriptVar_SingleSelectionExample_5

 

6. You can now save this info as a Template.
 

Server_Maintenance

 

This template can now be used in case of a maintenance and the message can be sent without any greater effort.

 

Therefor open the app Template (Templates -> Template) and select the created Template with the ScriptVar.

 

 

Additionally, you can call up the template via the Dashboard on the web interface, in the menupoint New Info.

 

ScriptVar_Select_ScriptVar_Template

 

 

Before you send the info, you will find your placed ScriptVar in the preview and can select this.

 

ScriptVar_Select_ScriptVar_Template_send

 

With an click on Replace ScriptVars and show preview, the ScriptVar will be replaced with the value. After that, you can send the Info.

 

ScriptVar_Select_ScriptVar_Template_send_send