Summary
This article covers the basic building blocks of creating a script.
Table of Contents
The scripting language is based on the general XML format where every tag has an opening tag and a closing tag. The format of most tags within the scripting language is as follows:
<tag> </tag>
There are actually two formats for closing at tag, which we will focus on later.
The building blocks of all scripts are the same. We always start out with the same tags, and all scripts contain certain key elements. This portion of the tutorial will step through building up each one of those parts of a script.
The script Tag
Every script starts with a “script” tag. This is the opening and closing tag of every script.
<script> </script>
The scriptId Attribute
Every script must be defined by a unique scriptId. This scriptId must be unique within the application. The scriptId should not contain spaces or special characters. It is merely a descriptor for the script and can be used to call the script from within another part of the platform, like the Imports.
<script scriptId="getVisitCode"> </script>
The body tag
Every script must also contain the body tag. The body tag contains the executable portion of the script that performs the comparison or assignment or triggers the alert.
<script scriptId="getVisitCode"> <body> </body> </script>
Comments
Comments in the scripting language are designated by <!- - and - -> and are useful for adding explanations to your script. They can also be used to “comment out” portions of the script that you want to have ignored during the processing of the script. These comments are also ignored during the creation of XML, so they won’t be included in a DA file opened from within Trial Manager.
<script scriptId="use-comment"> <body> <!-- This comment will be ignored during script execution --> </body> </script>
Need more help?
Please visit the Fountayn Contact Information page.