Parameters
Returns a collection of execution parameters assigned to the current execution record (association between audit test and IDEA table).
Compatibility
Available as of IDEA version 12.0
Syntax
Parameters As Collection
Return Value
Enumerable collection of physical execution parameters of current execution record. If the execution record is not available, an exception is thrown.
Remarks
Collection item (execution parameter) implements the following 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:
| Method | Data Type | Description |
|---|---|---|
| Count | Integer | Gets the 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 withing collection. index is zero based. |
Example
Sub Main()
Dim ac As Object
Dim atExecutor As Object
Dim parameters
Dim paramCheckBox1
Dim paramSingleList1
Set ac = CreateObject("SmartAnalyzer.AutomationClient")
atId = "f4d65220-77f1-5969-8943-59c7bd448460"
tblName = "Sample-Weblog"
Set atExecutor = SA.GetAtExecutor(atId, tblName)
Set parameters = atExecutor.Parameters
MsgBox"Parameters' count: " & parameters.Count
FOR EACH p IN parameters
MsgBox"Next parameter's name: '" + p.Id + "'"
NEXT
' Display certain parameters' values
Set paramCheckBox1 = parameters.Get("smartCheckBox1")
Set paramSingleList1 = parameters.Get("smartSingleList1")
MsgBox"Value of chexbox1: " & paramCheckBox1.Value
' Value of single list is collection; enumerate through it
FOR EACH v IN paramSingleList1.Value
MsgBox"Next value of singleList1: '" + v + "'"
NEXT
End Sub
When executed, this script produces the following output sequence:
Parameters' count: 3
Next parameter's name: 'smartCheckBox1'
Next parameter's name: 'smartCheckBox2'
Next parameter's name: 'smartSingleList1'
Value of chexbox1: True
Next value of singleList1: 'Potato'
Next value of singleList1: 'Tomato'
Next value of singleList1: 'Cucumber'