Skip to main content

Script Utilities

All scripts have access to a ScriptUtils class through the GetData arguments. All the commands fall under the “Context” method. This class contains the following utility functions: 

Property or Function

Description

DataRow DataRow { get ; }

Return all columns in the specified database table.

Void ClearStorage()

Clears all the web browser cookies and javascript associated with the specified URL on the computer.

Bool Equals( object obj )

It compares the contents and the contents being compared must be of object type.

String GetConnectionString

Returns the underlying database connection.

Int GetHashCode()

It returns a Hash code of an Integer value of 8 digits or numbers. Each time the script runs, it returns differently. 

Int GetRetryCount( string containerName)

It returns the count of the number of times the Command is added. 

The above functions explained can be used in the following ways:

Example:

CODE
 context.DataRow.GetString("Product")  

// “context” is the main function under which all these functions work. “DataRow” is used to access the data of any command in the current working command. “GetString” is then called to access the string content of the command named “Product”.

CODE
context.GlobalData.GetInt("Key");

context is the main function under which all these functions work. GlobalData is used to access the Values of the Input Parameters. GetString is then called to access the Int data type content of the parameter named Key.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.