DTParameter Object
Description
A parameter (column) in a sheet in the run-time data table. This object is not a built-in utility object, but can be accessed using one of the following methods:
Note: All methods performed on this object apply to the run-time DataTable object only. Changes to the run-time DataTable object are reflected in the run results, but the design-time data table is not affected.
Properties
Name | The name of the parameter (column) in the run-time data table. |
NumberFormat | The format in which the parameter value is expressed. |
RawValue | The raw value of the cell in the current row of the parameter in the run-time data table |
Value | Retrieves or sets the value of the cell in the current (active) row of the parameter in the run-time data table. |
ValueByRow | Retrieves the value of the cell in the specified row of the parameter in the run-time data table. |
Name Property
Description
The name of the parameter (column) in the run-time data table.
Syntax
DTParameter.Name
The following example uses the Name method to return the name of the newly created parameter in the run-time data table and writes it in the report.
Dim paramname
paramname = DataTable.LocalSheet.AddParameter("Food", "pizza").Name
Reporter.ReportEvent 1, "The New Parameter name is", paramname
NumberFormat Property
Description
The format in which the parameter value is expressed. The values of this property are all formats supported by Excel.
Syntax
DTParameter.NumberFormat
The following example uses the NumberFormat method to set the format of the Date parameter.
'The following example uses the NumberFormat method to set the parameter format as fraction
DataTable.GlobalSheet.GetParameter("Fraction").NumberFormat="#?/?"
'The following example uses the NumberFormat method to set the parameter format as date
DataTable.GlobalSheet.GetParameter("Time").NumberFormat="dd/mm/yyyy"
RawValue Property
Description
The raw value of the cell in the current row of the parameter in the run-time data table. The raw value is the actual string written in a cell before the cell has been computed, such as the actual text from a formula.
Syntax
DTParameter.RawValue
The following example uses the RawValue property to find the formula used in the current row of the Date column in the ActionA sheet of the run-time data table. The statement below returns the value: =NOW()
FormulaVal=DataTable.GetSheet("ActionA").GetParameter("Date").RawValue
Value Property
Description
Parameter default property. Retrieves or sets the value of the cell in the current (active) row of the parameter in the run-time data table.
Syntax
To find the value:
DTParameter.Value or DTParameter
To set the value:
DTParameter.Value=newvalue or DTParameter=newvalue
IMPORTANT
The values returned by this property follow the rules below:
If the cell contains a formula, this property returns the computed value of the formula.
For a Boolean value, the property returns True or False, similar to Excel.
For large numbers stored in scientific notation, the actual value of the number is returned, similar to Excel.
Note: In releases earlier than 2021, Boolean values were returned as TRUE or FALSE, and large numbers stored in scientific notation were returned in their scientific notation.
The following example uses the Value property to set the value in the current row of the Destination parameter (column) in the "ActionA" sheet of the run-time data table.
DataTable.GetSheet("ActionA").GetParameter("Destination").Value="New York"
Note: You could omit the word Value
in the statement above, because Value
is the default property for the DTParameter object.
ValueByRow Property
Description
Retrieves the value of the cell in the specified row of the parameter in the run-time data table.
Syntax
DTParameter.ValueByRow(RowNum)
Argument | Type | Description |
---|---|---|
RowNum | Number | Indicates the row of the parameter that should be returned. (Row numbers start with 1.) |
The following example uses the ValueByRow property to find the value in the 4th row of the Destination parameter (column) in the "ActionA" sheet of the run-time data table.
DataTable.GetSheet("ActionA").GetParameter("Destination").ValueByRow(4)
See also:
- Crypt Object
- DataTable Object
- Description Object
- DeviceReplay Object
- DotNetFactory Object
- DTParameter Object
- DTSheet Object
- Environment Object
- Extern Object
- Parameter Object
- JSON Object
- JsonUtil Object
- MercuryTimers Object (Collection)
- MercuryTimer Object
- NV Object
- OptionalStep Object
- ParallelUtil Object
- LocalParameter Object
- PasswordUtil Object
- PathFinder Object
- PDFUtil Object
- Properties Object (Collection)
- QCUtil Object
- RandomNumber Object
- Recovery Object
- Remote Connection Object
- Reporter Object
- RepositoriesCollection Object
- Repository Object
- Services Object
- Setting Object
- SystemMonitor Object
- TestArgs Object
- TextUtil Object
- UIAutomation Object
- VisualRelation Object
- VisualRelations Object
- VisualRelationsCollection Object
- WebUtil Object
- XMLUtil Object