Don't get lost: IMan Guides » IMan User Guide » References » VBScript Functions » Miscellaneous Functions

Miscellaneous Functions

CreateObject

Description

Creates and returns a reference to an object.

Syntax

  • CreateObject(typename [, location])

Arguments

  • typename
    • The type or class of the object to create.
  • location
    • Optional. The name of the network server where the object is to be created.

EncryptString

Description

Encrypts any string.

Syntax

  • EncryptString

Arguments

  • string
    • The string to be encrypted.

GetLocale

Description

Returns the current locale ID value.

A locale is a set of user preference information related to the user's language, country/region, and cultural conventions.

The locale determines such things as keyboard layout, alphabetical sort order, and date, time, number, and currency formats.

Syntax

  • GetLocale

Arguments

  • None

GetObject

Description

Returns a reference to an object from a file.

Syntax

  • GetObject([pathname] [, class])

Arguments

  • pathname
    • Optional. Full path and name of the file containing the object to retrieve. If pathname is omitted, class is required.
  • class
    • Optional string being the class of the object.

GetGlobalValue

Description

Retrieves a value previously saved with RegisterGlobalValue. If no matching key is found an empty string is returned.

Syntax

  • GetRegisteredValue(key)

Arguments

  • key
    • Value used to address or store the value. The key value may be either a single value or an array of values.

IIf

Description

An inline if statement, returning one of two values, depending on the evaluation of an expression.

Syntax

  • IIf( expression, truepart, falsepart )

Arguments

  • expression
    • Any valid Boolean expression.
  • truepart
    • Returned when expression evaluates to True.
  • falsepart
    • Returned when expression evaluates to False.

IsEmpty

Description

Returns a Boolean value indicating whether a variable has been initialized.

Syntax

  • IsEmpty(expression)

Arguments

  • expression
    • Can be any expression. However, because IsEmpty is used to determine if individual variables are initialized, the expression argument is most often a single variable name.

IsNull

Description

Returns a Boolean value that indicates whether an expression contains no valid data (Null).

Syntax

  • IsNull(expression)

Arguments

  • expression
    • Can be any expression.

IsObject

Description

Returns a Boolean value indicating whether an expression references a valid object.

Syntax

  • IsObject(expression)

Arguments

  • expression
    • Can be any expression.

RegisterValue

Description

Stores a value which is persisted during a single transform by its key. The function is used in conjunction with GetRegisteredValue to retrieve the stored value.

Syntax

  • RegisterValue(key, value)

Arguments

  • key
    • The value used to address or store the value. The key value may be either a single value or an array of values.
  • value
    • The value to store.

SetLocale

Description

Sets the global locale and returns the previous locale.

Syntax

  • SetLocale(lcid)

Arguments

  • lcid
    • Any valid 32-bit value or short string that uniquely identifies a geographical locale. Recognized values can be found in the Locale ID chart.
    • If lcid is zero, the locale is set to match the current system setting.

TypeName

Description

Returns a string that provides Variant subtype information about a variable.

Syntax

  • TypeName(varname)

Arguments

  • varname
    • Any variable.

VarType

Description

Returns a value indicating the subtype of a variable.

Syntax

  • VarType(varname)

Arguments

  • varname
    • Any variable.

WriteToLog

Description

Writes an entry to the detail area of the log.

Syntax

  • WriteToLog code, message

Arguments

Note this is a procedure (or sub) and there should NOT be any parentheses placed around the arguments.

  • code
    • The number or code to be written to the ResultCode field of the log.
  • message
    • The message to be written to the ResultReason field of the log.