CasewareDocs

Parameters

Returns a collection of execution parameters of audit test.

Compatibility

Available as of IDEA version 12.0

Syntax

Parameters As Collection

Return Value

Enumerable collection of logical execution parameters of audit test

Remarks

Collection item (execution parameter) implements the following properties:

Properties
Method Data Type Description
Id String Gets symbolic name (id) of parameter.
ParameterType Integer

Gets parameter type. Type can be:

Unknown = 0

Aging = 1

CheckBox = 2

ComboBox = 3

Duplicate = 4

FromToList = 5

Gap = 6

OptionGroup = 7

SingleList = 8

Stratification = 9

TextBox = 10

Weekend = 11

ParameterDataType Integer

Gets parameter data type. Data type can be:

Unknown = 0

Numeric = 1

Decimal = 2

String = 3

Date = 4

Time = 5

DisplayName String Gets human readable name of parameter.
Value Object Gets/sets parameter's value. The value of logical parameter is always empty.

Parameters’ collection is enumerable, i.e., it can be used within FOR EACH loop. Besides, it implements the following properties/methods:

Properties/Methods
Method Data Type Description
Count Integer Gets number of items in collection.
Get(id As String) Object

Returns execution parameter with specified ID. If no such parameter exists, nothing is returned.

Item(index As Integer) Object

Returns execution parameter by its index within collection. Index is zero based.

Example

Sub Main()
Dim ac As Object
Dim at As Object
Set ac = CreateObject("SmartAnalyzer.AutomationClient")
Set at = ac.GetAT("f4d65220-77f1-5969-8943-59c7bd448460")
Set params = at.Parameters
' obtaining parameters’ count
MsgBox"Parameters' count: " & params.Count
' obtaining parameter by its index
id0 = params.Item(0).Id
' obtaining parameter by its id (symbolic name)
Set par0 = params.Get(id0)
MsgBox"Name of the first parameter: '" + id0 + "'"
MsgBox "Display name of '" + id0 + "' parameter: '" + par0.DisplayName + "'"
' enumerating parameters’ collection
FOR EACH p IN params
MsgBox "Next param: name = '" & p.Id & "', type = " & p.ParameterType &_
", data type = " & p.ParameterDataType &_
", display name = '" & p.DisplayName & "'"
NEXT
End Sub

When executed, this script produces the following output sequence:

Parameters' count: 3

Name of the first parameter: 'smartCheckBox2'

Display name of 'smartCheckBox2' parameter: 'Find empty comments'

Next param: name = 'smartCheckBox2', type = 2, data type = 1, display name = 'Find empty comments'

Next param: name = 'smartSingleList1', type = 8, data type = 3, display name = 'Search for'

Next param: name = 'smartCheckBox1', type = 2, data type = 1, display name = 'Enable case sensitive search'